Optical metasurfaces (subwavelength-patterned surfaces typically described by variable effective surface impedances) are typically modeled by an approximation akin to ray optics: the reflection or transmission of an incident wave at each point of the surface is computed as if the surface were “locally uniform,” and then the total field is obtained by summing all of these local scattered fields via a Huygens principle. (Similar approximations are found in scalar diffraction theory and in ray optics for curved surfaces.) In this paper, we develop a precise theory of such approximations for variable-impedance surfaces. Not only do we obtain a type of adiabatic theorem showing that the “zeroth-order” locally uniform approximation converges in the limit as the surface varies more and more slowly, including a way to quantify the rate of convergence, but we also obtain an infinite series of higher-order corrections. These corrections, which can be computed to any desired order by performing integral operations on the surface fields, allow rapidly varying surfaces to be modeled with arbitrary accuracy, and also allow one to validate designs based on the zeroth-order approximation (which is often surprisingly accurate) without resorting to expensive brute-force Maxwell solvers. We show that our formulation works arbitrarily close to the surface, and can even compute coupling to guided modes, whereas in the far-field limit our zeroth-order result simplifies to an expression similar to what has been used by other authors.