Is it possible to check injectivity of a homomorphism by checking just the generators of the group?

No. Take $\varphi\colon\mathbb{Z}^2\longrightarrow\mathbb Z$ define by $\varphi(x,y)=x+2y$. The group $\mathbb{Z}^2$ is generated by $(1,0)$ and $(0,1)$ and $\varphi(1,0)\neq\varphi(0,1)$. However, $\varphi$ is not injective.


No. With what you suggest, the map $\Psi: G\to G$ that is the identity on all generators except one, $g_1$ which is mapped to $e$, would be injective.

Or if for instance every $g_i$ is of infinite order you could define $\phi(g_i)=g_1^i$, which is again strongly not injective but fails your test.