We study large deviations, over a long time window
T→∞, of the dynamical observables
An=∫0Txn(t)dt,
n=3,4,…, where
x(t) is a centered stationary Gaussian process in continuous time. We show that, for short-correlated processes the probability density of
An exhibits an anomalous scaling
P(An,T)∼exp[−Tμfn(ΔAnT−ν)] at
T→∞ while keeping
ΔAnT−ν constant. Here
ΔAn is the deviation of
An from its ensemble average. The anomalous exponents
μ and
ν depend on
n and are smaller than
1, whereas the rate function
fn(z) exhibits a first-order dynamical phase transition (DPT) which resembles condensation transitions observed in many systems. The same type of anomaly and DPT, with the same
μ and
ν, was previously uncovered for the Ornstein-Uhlenbeck process - the only stationary Gaussian process which is also Markovian. We also uncover an anomalous behavior and a similar DPT in the long-correlated Gaussian processes. However, the anomalous exponents
μ and
ν are determined in this case not only by
n but also by the power-law long-time decay
∼∣t∣−α of the covariance. The different anomalous scaling behavior is a consequence of a faster-than-linear scaling with
T of the variance of
An. Finally, for sufficiently long-ranged correlations,
\alpha<2/n, the DPT disappears, giving way to a smooth crossover between the regions of typical, Gaussian fluctuations and large deviations. The basic mechanism behind the DPT is the existence of strongly localized optimal paths of the process conditioned on very large
An and coexistence between the localized and delocalized paths of the conditioned process. Our theoretical predictions are corroborated by replica-exchange Wang-Landau simulations where we could probe probability densities down to
10−200.