The structural modes of a 2D periodic array of metallic cylinders near a dielectric interface are studied, for large and small wavelength-to-period ratios. We show that there are two clearly distinguished kinds of resonances: waveguide modes of the gap between the array and the interface, and eigenmode excitations (plasmons). While waveguide modes are present for both polarizations, surface plasmon polaritons (SPPs) only occur for p polarization, and, under particular conditions, this mechanism can produce an efficient coupling (about 60%) between the incident evanescent wave and the eigenmodes supported by the structure, which produces an enhanced transmitted propagating order. The response of the structure is analysed in detail by varying its relevant parameters, paying particular attention to the interplay between SPPs and Rayleigh anomalies, and its effect on the grating response.