Fidelity approach to Gaussian transitions