Analytical examination of plane electromagnetic wave diffraction on a surface with periodically modulated impedance or a shallow profile is presented. For small absorption and high reflection there exist sharp resonances caused by excitation of surface plasmon polaritons. We consider the specific angles of incidence for in-plane geometry corresponding to simultaneous excitation of two polaritons propagating in the opposite directions. The simplest case corresponds to close-to-the-value arcsin(1/3) angle of incidence, when two diffracted orders with numbers +1 and -2 are close to the surface polaritons simultaneously and their amplitudes in the vicinity of the resonance become much greater than that of the incident wave. Scattering both of the resonance waves on the grating leads to essential changes in the amplitudes of the specular and other reflected waves, including the anti-specular reflected wave, as compared with nonresonance case for rather small the surface impedance modulation. Dependence of the amplitudes of the reflected waves and the polaritons on the parameters of the problem is examined for the arbitrary-form gratings. The characteristic values of the most relevant “inter-resonance” and “resonance” Fourier amplitudes of the grating (relating to the first-order interaction of the polaritons and to transformation of the incident wave into the polaritons, respectively) are found. It is shown that in the resonance vicinity, the results can be simplified. This allows complete analytical treatment. Existence of the wide set of the gratings that correspond to the universal self-similar behavior under double resonance conditions is demonstrated. The gratings with specific parameters relating to the given redistribution of the energy between different reflected waves and polaritons are described. A comparison between the evolved theory and the experimental results shows excellent agreement. The results obtained may be employed to smart media design.