In modern optics, periodically modulated structures are omnipresent. Commonly known as photonic crystals, they constitute the optical analog of crystal structures in solid state physics. Consequently, photonic crystals possess a band structure, i.e., linear light propagation becomes impossible if the corresponding wave vectors lie within certain, "forbidden" intervals (photonic band gaps). In the presence of a nonlinearity however, spatially localized structures can exist inside these band gaps. The stability properties of these so-called gap solitons are the principal topic of this thesis. Considering a photorefractive nonlinearity, both elementary and more complicated gap solitons featuring phase singularities (gap vortices, vortex clusters) are investigated. It is demonstrated that the anisotropy of the photorefractive effect strongly influences the symmetry of the optically induced photonic lattices as well as the stability properties of the gap solitons. From a theoretical point of view (nonlinear Schrödinger equation, Gross-Pitaevskii equation), the system presented in this thesis is closely related to Bose-Einstein condensates in periodic potentials.