OK, just noticed **mme's comment**, which considers the very same counterexample below with a clean one-line argument. I'm leaving this here in case someone finds something of any value, but I think mme's comment **should be made an answer and then accepted.**

----------

**Valid counterexample but overkill proof**

A counterexample related to Tyler Lawson's comment seems to work. It is a group $G$ considered by Taylor *"Covering Groups of Nonconnected Topological Groups"*. The group $G$ is formed by the quaternions $a+bi+cj+dk\in\mathbb{H}$ satisfying:

$$a^2+b^2+c^2+d^2=1,\qquad (a^2+b^2)(c^2+d^2)=0.$$

In this case $G_c=S^1$, since it is given by the elements with $a^2+b^2=1$ and $c=d=0$, $G/G_c=\pi_0G=\mathbb{Z}/(2)$, and the extension

$$S^1\hookrightarrow G\twoheadrightarrow \mathbb{Z}/(2)$$

doesn't split, not even algebraically. Moreover, if we splice it with the short exact sequence

$$\mathbb{Z}/(2)\hookrightarrow S^1\twoheadrightarrow S^1$$

whose second map is $z\mapsto z^2$, we obtain a crossed module

$$\mathbb{Z}/(2)\hookrightarrow S^1\rightarrow G\twoheadrightarrow \mathbb{Z}/(2)$$

whose classifying element 

$$\chi\in H^3(B\mathbb{Z}/(2),\mathbb{Z}/(2))\cong \mathbb{Z}/(2)$$

doesn't vanish. This was proved by Taylor and it is equivalent to the fact that $G$ doesn't have a double covering group.

Let me indicate why $\chi$ is in the kernel of 

$$H^3(B\mathbb{Z}/(2),\mathbb{Z}/(2))\longrightarrow H^3(BG,\mathbb{Z}/(2)).$$

Since $G_c=S^1$ has solvable Lie algebra (in fact abelian), if $G^\delta$ denotes $G$ with the discrete topology, the morphism

$$H^3(BG,\mathbb{Z}/(2))\rightarrow H^3(BG^\delta,\mathbb{Z}/(2))$$

induced by the identity map $G^\delta\rightarrow G$ is an isomorphism by a theorem of Milnor *"On the homology of Lie groups made discrete"*. The element $\chi$ is in the kernel of 

$$H^3(B\mathbb{Z}/(2),\mathbb{Z}/(2))\longrightarrow H^3(BG^\delta,\mathbb{Z}/(2))$$

because the vertical arrow in 

$$\begin{array}{cc}
&G^{\delta}\\
&\downarrow\\
\mathbb{Z}/(2)\hookrightarrow S^1\rightarrow G\twoheadrightarrow &\mathbb{Z}/(2)
\end{array}$$

has a lift (the identity $G^\delta\rightarrow G$).


----------

**Previous non-answer**

You're taking cohomology of classifying spaces, aren't you? I thought first that the answer was positive, but there was a mistake in my argument. I can recycle the argument to show that there is an exact sequence

$$H^2(B\pi_0G,A)\hookrightarrow H^2(BG,A)\rightarrow H^2(BG_c,A)^{\pi_0G}\rightarrow H^3(B\pi_0G,A)\rightarrow H^3(BG,A)$$

from which one can extract various necessary and/or sufficient condition for your map (the last one in the sequence) to be injective. Here all maps, except for the third one, are induced by morphisms in the short exact sequence below.

The short exact sequence

$$G_c\hookrightarrow G\twoheadrightarrow G/G_c=\pi_0G$$

induces a fibration after taking classifying spaces

$$BG_c\hookrightarrow BG\twoheadrightarrow B\pi_0G.$$

This, in turn, gives rise to a Serre spectral sequence

$$E_2^{p,q}=H^p(B\pi_0G,H^q(BG_c,A))\Longrightarrow H^{p+q}(BG,A).$$

The spectral sequence differential $d_r$ has bidegree $(r,1-r)$ and the cohomology groups $H^q(BG_c,A)$ are regarded here as $\pi_0G$-modules.

The morphism whose injectivity you want to prove decomposes as

$$E_2^{3,0}=H^3(B\pi_0G,A)\twoheadrightarrow E_\infty^{3,0}\hookrightarrow H^3(BG,A).$$

We have exact sequences

$$E_2^{1,1}\stackrel{d_2}{\longrightarrow}E_2^{3,0}\twoheadrightarrow E_3^{3,0}$$

$$E_3^{0,2}\hookrightarrow E_2^{0,2}\stackrel{d_2}{\longrightarrow}E_2^{2,1}$$

$$E_2^{0,1}\rightarrow E_2^{2,0}\twoheadrightarrow E_3^{2,0}=E_\infty^{2,0}$$

$$E_\infty^{0,2}=E_4^{0,2}\hookrightarrow E_3^{0,2}\stackrel{d_3}{\longrightarrow}E_3^{3,0}\twoheadrightarrow E_4^{3,0}=E_\infty^{3,0}$$

The group
$$E_2^{n,1}=H^n(B\pi_0G,H^1(BG_c,A))=0$$
vanishes because $G_c$ is connected hence $BG_c$ is simply connected so $H^1(BG_c,A)=0$. Therefore

$$E_3^{3,0}=E_2^{3,0},\quad E_3^{0,2}=E_2^{0,2},\quad E_\infty^{2,0}=E_2^{2,0}.$$

Moreover, we have a short exact sequence

$$E_\infty^{2,0}\hookrightarrow H^2(BG,A)\twoheadrightarrow E_\infty^{0,2}.$$

Splicing some of the previous exact sequences we get an exact sequence

$$E_2^{2,0}\hookrightarrow H^2(BG,A)\rightarrow E_2^{0,2}\rightarrow E_2^{3,0}\rightarrow H^3(BG,A).$$

This is the first exact sequence, above. We just have to notice that 

$$E_2^{0,2}=H^0(B\pi_0G,H^2(BG_c,A))=H^2(BG_c,A)^{\pi_0G}.$$