A model is derived for the elastic response of polyelectrolyte gels subjected to unconstrained and constrained swelling. A gel is treated as a three-phase medium consisting of a solid phase (polymer network), solvent (water), and solutes (mobile ions). Transport of solvent and solutes is modeled as their diffusion through the network accelerated by an electric field formed by ions and accompanied by chemical reactions (dissociation of functional groups attached to the chains). Constitutive equations (including the van't Hoff law for ionic pressure and the Henderson-Hasselbach equation for ionization of chains) are derived by means of the free energy imbalance inequality. Good agreement is demonstrated between equilibrium swelling diagrams on several pH-sensitive gels and results of simulation. It is revealed that swelling of polyelectrolyte gels is driven by electrostatic repulsion of bound charges, whereas the effect of ionic pressure is of secondary importance.