The constituent elements of metasurfaces may be designed with explicit polarization dependence, making metasurfaces a fascinating platform for new polarization optics. In this work we show that a metasurface grating can be designed to produce arbitrarily specified polarization states on a set of defined diffraction orders given that the polarization of the incident beam is known. We also demonstrate that, when used in a reverse configuration, the same grating may be used as a parallel snapshot polarimeter, requiring a minimum of bulk polarization optics. We demonstrate its use in measuring partially polarized light, and show that it performs favorably in comparison to a commercial polarimeter. This work is of consequence in any application requiring lightweight, compact, and low-cost polarization optics, polarimetry, or polarization imaging.