Extending homomorphism on subgroup to the whole group
Solution 1:
Your conjecture is almost true. But you need more than just $G/N$ isomorphic to $H$. See below the line.
Explicitly:
The group $G_1$ and subgroup $H$ satisfy the stated property if and only if there exists a normal subgroup $N$ of $G_1$ such that $G_1=NH$ and $N\cap H=\{e\}$. That is, $H$ must be a retract of $G_1$ (h/t to Moishe Kohan).
Sufficiency follows as you indicate.
For necessity, as usual with this kind of statements, the key is to pick a particular (clever?) choice of $G_2$ and $\phi$ to force the desired conclusion.
Suppose $H$ and $G_1$, with $H\leq G_1$, has the property that for every group $G_2$ and every morphism $\phi\colon H\to G_2$ there exists a morphism $\psi\colon G_1\to G_2$ such that $\psi|_{H} = \phi$.
Take $G_2=H$, and $\phi=\mathrm{id}_H$. Then there exists $\psi\colon G_1\to H$ such that $\psi|_{H}=\mathrm{id}_H$. In particular, if we compose $\iota\colon H\hookrightarrow G_1$ with $\psi$, we get $\psi\circ\iota\colon H\to H$ and $\psi\circ\iota(h) = \psi(h) = h$ for all $h\in H$. That is, $\psi$ splits the embedding $\iota\colon H\hookrightarrow G_1$.
Let $N=\mathrm{ker}(\psi)$. Then $N\cap H=\{e\}$. Given $g\in G_1$, we have $g(\iota(\psi(g))^{-1}\in N$, since $$\psi(g)\psi(\iota(\psi(g)))^{-1} = \psi(g)\psi(g)^{-1}=e;$$ thus, $g\in NH$. Hence, $G_1=NH$, $N\triangleleft G_1$, and $N\cap H=\{e\}$. Therefore, $G_1/N\cong H$, as desired.
The error in your argument for sufficiency is that you are asserting that $G/N\cong H$ implies that $G$ is an internal semidirect product of $N$ by $H$. This is not true in general.
For example, take $G=Q_8$, the quaternion group of order $8$, and let $H=\{1,-1\}$. Then $G$ contains four different normal subgroups $N$ with $G/N\cong H$, but we know that $G$ is not a semidirect product. You cannot extend the identity map of $H$ to a homomorphism $Q_8\to C_2$; you can map $Q_8$ to $C_2$, but it won't extend the identity map of $H$ because $H$ is contained in all the nontrivial normal subgroups of $Q_8$. You cannot decompose $Q_8$ as an internal semidirect product.
So you need more than just $G/N$ isomorphic to $H$; you need that projection to split. That is, you need $G$ to be the internal semidirect product of $N$ by $H$.