We study static and spherically symmetric charged stars with a nontrivial profile of the scalar field $phi$ in Einstein-Maxwell-scalar theories. The scalar field is coupled to a $U(1)$ gauge field $A_{mu}$ with the form $-alpha(phi)F_{mu u}F^{mu u}/4$, where $F_{mu u}=partial_{mu}A_{ u}-partial_{ u} A_{mu}$ is the field strength tensor. Analogous to the case of charged black holes, we show that this type of interaction can induce spontaneous scalarization of charged stars under the conditions $({rm d}alpha/{rm d}phi) (0)=0$ and $({rm d}^2alpha/{rm d}phi^2) (0)>0$. For the coupling $alpha (phi)=exp (-beta phi^2/M_{rm pl}^2)$, where $beta~(<0)$ is a coupling constant and $M_{rm pl}$ is a reduced Planck mass, there is a branch of charged star solutions with a nontrivial profile of $phi$ approaching $0$ toward spatial infinity, besides a branch of general relativistic solutions with a vanishing scalar field, i.e., solutions in the Einstein-Maxwell model. As the ratio $rho_c/rho_m$ between charge density $rho_c$ and matter density $rho_m$ increases toward its maximum value, the mass $M$ of charged stars in general relativity tends to be enhanced due to the increase of repulsive Coulomb force against gravity. In this regime, the appearance of nontrivial branches induced by negative $beta$ of order $-1$ effectively reduces the Coulomb force for a wide range of central matter densities, leading to charged stars with smaller masses and radii in comparison to those in the general relativistic branch. Our analysis indicates that spontaneous scalarization of stars can be induced not only by the coupling to curvature invariants but also by the scalar-gauge coupling in Einstein gravity.