We present a JWKB theory which describes the propagation of seismic surface waves in a laterally heterogeneous, anisotropic waveguide. We introduce a local dispersion relation and local vertical eigenfunctions which depend explicitly on the direction of the local wavevector as a consequence of the anisotropy. the variation of amplitude along a surface wave ray path is determined by a conservation law for the surface wave energy. Apart from the usual dynamical phase, which is the integral of the local wavevector along a ray path, there is an additional variation in phase in a general anisotropic waveguide. This additional phase, which is an analogue of the Berry phase in adiabatic quantum mechanics, vanishes in a waveguide with a local vertical two-fold symmetry axis or a local horizontal mirror plane.