The principal results of modern electromagnetic theory of gratings are reviewed briefly in this chapter. The model initial boundary value problems and boundary value problems are formulated and supplied with basic equations, domains of analysis, boundary and initial conditions, and the condition providing their unambiguous resolution are determined. The analytic relations between problems in time and frequency domains are found out. The problems connected with the consideration of gratings as open periodic resonators and waveguides are formulated and analyzed. The actual essential results of spectral theory of gratings and resonant scattering theory by periodic structures are presented in concise form.