When an electromagnetic wave is obliquely incident on the interface between two homogeneous media with different refractive indices, the requirement of phase continuity across the interface generally leads to a shift in the trajectory of the wave. When a linearly position dependent phase shift is imposed at the interface, the resulting refraction may be described using a generalized version of Snell's law. In this Letter, we establish a formal equivalence between generalized refraction and blazed diffraction gratings, further discussing the relative merits of the two approaches.