  In this paper we deal with a large class of dynamical systems having a
version of the spectral gap property. Our primary class of systems comes from
random dynamics, but we also deal with the deterministic case. We show that if
a random dynamical system has a fiberwise spectral gap property as well as an
exponential decay of correlations in the base, then, developing on
Gou\"{e}zel's approach, the system satisfies the almost sure invariance
principle. The result is then applied to uniformly expanding random systems
like those studied by Denker and Gordin and Mayer, Skorulski, and Urba\'nski.
