  We introduce the concepts of generalized compatible and cocompatible
bimodules in order to characterize Gorenstein projective, injective and flat
modules over trivial ring extensions. Let $R\ltimes M$ be a trivial extension
of a ring $R$ by an $R$-$R$-bimodule $M$ such that $M$ is a generalized
compatible $R$-$R$-bimodule and $\textbf{Z}(R)$ is a generalized compatible
$R\ltimes M$-$R\ltimes M$-bimodule. We prove that $(X,\alpha)$ is a Gorenstein
projective left $R\ltimes M$-module if and only if the sequence $M\otimes_R
M\otimes_R X\stackrel{M\otimes\alpha}\rightarrow M\otimes_R
X\stackrel{\alpha}\rightarrow X$ is exact and coker$(\alpha)$ is a Gorenstein
projective left $R$-module. Analogously, we explicitly characterize Gorenstein
injective and flat modules over trivial ring extensions. As an application, we
describe Gorenstein projective, injective and flat modules over Morita context
rings with zero bimodule homomorphisms.
