G-principal bundle and homotopy retract Suppose that $f:X\rightarrow Y$ a continuous map between (connected) CW-complexes such that there exists a continuous map $g:Y\rightarrow X$ with the property that $g\circ f$ is homotopy equivalent to $id_{X}$ i.e., $X$ is homotopy retract of $Y.$ Let $P$ be a $G$-principal bundle over $Y$ ($G$ is a fixed connected topological group). We define the pullback $G$-principal bundle over $X$ given by $f^{\ast}P$. Is it true that $P$ is a homotopy retract of $f^{\ast}P$ ? Or more generally, can we prove that $\pi_{\ast}(f^{\ast}(P))\rightarrow \pi_{\ast}(P)$ is injective ?

I'm not sure if you have made a mistake with your question, but if you mean 'is $f^*P$ a retract of $P$' then the answer is false.
For instance take $X=S^2$, $Y=S^2\times S^2$ and let $P=S^2\times S^3$ be the product of the trivial bundle and the Hopf bundle. Let $f=in_1:S^2\rightarrow S^2\times S^2$, $x\mapsto (x,\ast)$, and $g=pr_1:S^2\times S^2\rightarrow S^2$, $(x,y)\mapsto x$. 
Then $f^*P\cong S^2\times S^1$ is the trivial bundle. Clearly 
$$\pi_1(f^*P)=\pi_1(S^2\times S^1)=\mathbb{Z}\rightarrow \pi_1(S^2\times S^3)=0$$
cannot be injective.
On the other hand, if you truly did mean, 'is $P$ a homotopy retract of $f^*P$', then the answer is still no. For example
$$\pi_3(P)=\pi_3(S^2\times S^3)\cong \mathbb{Z}\oplus\mathbb{Z}\rightarrow \pi_3(S^2\times S^1)\cong\mathbb{Z}$$
is clearly not injective, forbidding such a retraction.
