A method of moments solution is presented for the problem of two-dimensional acoustic scattering of a plane wave from a general piecewise homogeneous periodic structure. The reduction of the general problem to a consideration of the fields over a suitably selected period, referred to as the unit cell, is facilitated by the Floquet theorem. The solution then uses fictitious spatially periodic and properly modulated strip sources to simulate the fields in homogeneous regions crossed by the unit cell boundaries and fictitious filamentary sources to simulate the fields in homogeneous regions completely enclosed within this cell. The fields radiated by the strip sources are represented in terms of Floquet modes. Finally, the simulated fields are forced to obey the continuity conditions for the pressure and the normal component of the velocity at selected sets of points on the boundaries among the regions within the unit cell. The procedure is simple to implement, rapidly converging, and is applicable to structures of arbitrary smooth cross section. Acoustically rigid and soft regions are also treated within the general procedure. Results are given and compared with available data and with an analytic approximation.