This is a standard situation. When you look at $\mathrm{Im}(h)$, you are seeing a "shadow" of $G$; two elements that map to the same thing will differ by an element of the kernel. So the idea is to "pull back" the generating set for $\mathrm{Im}(h)$ into $G$; this will allow you to find, for every $g\in G$, an element $x$ that maps to the same thing as $g$ and which can be expressed in terms of this "pull back" of the generating set of $\mathrm{Im}(h)$. This element $x$ may or may not be equal to $g$ (in general it won't be), but you know that $x$ and $g$ have the same image, so you know that $gx^{-1}$ is in the kernel. So if you can describe the elements of the kernel, then you can describe $gx^{-1}$. Thus, you can describe $x$, and you can describe $gx^{-1}$, so putting them together will let you describe $(gx^{-1})x = g$.
Let $\{t_i\}_{i\in I}$ be a set of generators for $h(G)$, and let $\{k_j\}_{j\in J}$ be a set of generators for $\mathrm{ker}(h)$. For each $i\in I$, fix any $g_i\in G$ such that $h(g_i) = t_i$.
Claim. $S=\{g_i\}_{i\in I}\cup \{k_j\}_{j\in J}$ is a generating set for $G$.
Proof of claim. Let $g\in G$. Then we can write $h(g)$ as a product of $t_i$ and their inverses, $h(g) = t_{i_1}^{\epsilon_{i_1}}\cdots t_{i_r}^{\epsilon_{i_r}}$ where $\epsilon_{i_k}=\pm 1$ for each $k$. Let $x\in G$ be given by $x = g_{i_1}^{\epsilon_{i_1}}\cdots g_{i_r}^{\epsilon_{i_r}}.$ Then $\begin{align*} h(x) &= h(g_{i_1})^{\epsilon_{i_1}}\cdots h(g_{i_r})^{\epsilon_{i_r}}\\ &= t_{i_1}^{\epsilon_{i_1}}\cdots t_{i_r}^{\epsilon_{i_r}}\\ &= h(g), \end{align*}$ hence we know that $gx^{-1}\in\mathrm{ker}(h)$. Therefore, we know we can expresss $gx^{-1}$ as a product of $k_j$ and their inverses, $gx^{-1} = k_{j_1}^{\eta_{j_i}}\cdots k_{j_s}^{\eta_{j_s}},$ where $\eta_{j_m}=\pm 1$ for all $m$. Therefore, $\begin{align*} g &= (gx^{-1})x\\ &= \Bigl( k_{j_1}^{\eta_{j_i}}\cdots k_{j_s}^{\eta_{j_s}}\Bigr)x\\ &= \Bigl(k_{j_1}^{\eta_{j_i}}\cdots k_{j_s}^{\eta_{j_s}}\Bigr)\Bigl(g_{i_1}^{\epsilon_{i_1}}\cdots g_{i_r}^{\epsilon_{i_r}}\Bigr). \end{align*}$ This shows that $g$ can be expressed as a product of elements of $S$ and their inverses.