In this work the features of the resonance in a rectangular dielectric surface-relief gratings, illuminated with a limited cross-section Gaussian beam, have been studied. The rigorous coupled wave method and beam decomposition into the plane waves by the Fourier transform have been used. It is shown that there is a resonant wavelength for each thickness of the dielectric grating. The value of resonant wavelength depends on the beam angle of incidence on the gratings. Moreover, the two types of resonances can occur in the grating at certain grating parameters. The power reflection coefficient is practically equal to unity for the first type of resonance and is much smaller than unity, for the second one. The obtained results extend the knowledge regarding the nature of the waveguide resonance in the dielectric grating, considering the limited cross section beam, and they can increase its use in many applications.