We have implemented a coherence-gated wavefront sensor on a two-photon excitation microscope. We used the backscattered near-infrared light from the sample to interfere with an optically flat reference beam. By applying a known waverfront tilt in the reference beam, a fringe pattern emerged on the camera. The deformmation of the wavefront due to the turbid media under study warps the fring pattern, similar to frequency modulation. Through Fourier transform analysis of the modulated fringe pattern we were able to determine the wave fornt aberrations induced by synthetic and biological samples. By defocussing the microscope objective and measuring the wavefront deformation we established that the errors are reproduceible to within ensuremathłambda/227 for the defocus mode.