We present a fast spectral Galerkin scheme for the discretization of boundary integral equations arising from two-dimensional Helmholtz transmission problems in multi-layered periodic structures or gratings. Employing suitably parametrized Fourier basis and excluding cut-off frequen- cies (also known as Rayleigh-Wood frequencies), we rigorously establish the well-posedness of both continuous and discrete problems, and prove super-algebraic error convergence rates for the proposed scheme. Through several numerical examples, we confirm our findings and show performances competitive to those attained via Nystr\"om methods.