Large deviations of Gaussian random functions