Mathematical models of polyelectrolyte gels are often simplified by assuming the gel is electrically neutral. The rationale behind this assumption is that the thickness of the electric double layer (EDL) at the free surface of the gel is small compared to the size of the gel. Hence, the thin-EDL limit is taken, in which the thickness of the EDL is set to zero. Despite the widespread use of the thin-EDL limit, the solutions in the EDL are rarely computed and shown to match to the solutions for the electrically neutral bulk. The aims of this paper are to study the structure of the EDL and establish the validity of the thin-EDL limit. The model for the gel accounts for phase separation, which gives rise to diffuse interfaces with a thickness described by the Kuhn length. We show that the solutions in the EDL can only be asymptotically matched to the solutions for an electrically neutral bulk, in general, when the Debye length is much smaller than the Kuhn length. If the Debye length is similar to or larger than the Kuhn length, then phase separation can be initiated in the EDL. This phase separation spreads into the bulk of the gel and gives rise to electrically charged layers with different degrees of swelling. Thus, the thin-EDL limit and the assumption of electroneutrality only generally apply when the Debye length is much smaller than the Kuhn length.