The resonant interaction of a plane wave and a one-dimensional Gaussian beam with a high-contrast dielectric grating was analyzed. Rigorous coupled wave analysis (RCWA) was used to numerically model the diffraction of a plane wave by the grating. RCWA, a discrete Fourier transform at the fulfillment (of the conditions) of the sampling theorem, was used to study diffraction of the Gaussian beam. The grating can be considered as a one-dimensional photonic crystal along which the waveguide mode propagates under resonance. The corresponding photonic crystal has both allowed and forbidden photonic bands for the propagating waveguide mode under resonance due to the high-contrast dielectric permittivity. There is no significant difference between the spectral and angular characteristics under the interaction of the plane wave or the Gaussian beam with grating, if the waveguide mode is in the forbidden photonic bandgap. The reflection coefficient from the grating is practically equal to unity for both cases. Resonant spectral and angular characteristics become wider at the Gaussian beam diffraction compared to the resonance curves for the plane wave in the case when the waveguide mode is in the allowed photon bandgap. The reflection coefficient from the grating becomes less than unity and its value tends to unity when the Gaussian beam width increases.