If $G$ is compact, the inclusion $H(M^G) \to H(M)^G$ is an isomorphism. The inverse map is defined as follows: Take a class $\omega$ in $H(M)^G$ and lift it to a closed form $\alpha \in \Omega(M)$. Put $\beta = \int_{g \in G} g^{\ast} \alpha$, where the integral is with respect to Hodge measure normalized to have volume $1$. Clearly, $\beta \in \Omega(M)^G$. Our lift will map $\omega$ to $[\beta]$. 

We must check that $\beta$ is closed, is a de Rham representative of $\omega$, and that its class in $H(M^G)$ is independent of the choice of $\alpha$. Since all $g^{\ast} \alpha$ are closed, so is $\beta$. Since all $g^{\ast} \alpha$ are de Rham representatives of $\omega$, so is $\beta$. Finally, let $\alpha' = \alpha + d \eta$ be another lift of $\omega$. Then
$$\int_{g \in G} g^{\ast} \alpha' = \int_{g \in G} g^{\ast} \alpha + d \int_{g \in G} g^{\ast} \eta$$
and $\int_{g \in G} g^{\ast} \eta$ is in $\Omega(M)^G$.

When $G$ is not compact, injectivity can fail. 
Consider $M = \mathbb{R}$ and $G = \mathbb{Z}$ acting by translations. The $1$-form $dx$ is closed and $G$-invariant on $\mathbb{R}$, but has not $G$-invariant integral. So it gives a nonzero class in $H^1(M^G)$, but of course $H^1(M)^G \subseteq H^1(M) = 0$.

I haven't found an example where surjectivity fails. 

One should mention that, when the action is free, what you are calling $H(M^G)$ is simply $H(M/G)$.