You can describe abstract group extensions of H with G by 2-cocycles of group cohomology.
If you have an extension E, you get an induced H-operation on G, by conjugating in E (take any set-theoretic section of $E\to G$). The extensions of G with H with this H-operation on G are classified up to isomorphism, by the second group cohomology. You get a 2-cocycle corresponding to E by taking any set-theoretic section $s : G\to E$ of $E\to G$ that maps 1 to 1 and write down the 2-cocycle $c : H \times H \to G$ by $c(h,h'):=s(h)s(h')s(hh')^{-1}$.
Then equip the set $G\times H$ with the multiplication $(g,h)(g',h') := (g+h.g'+c(h,h'),hh')$. More explicitly, this is $(g,h)(g',h') = (g+s(h)g's(h)^{-1}+s(h)s(h')s(hh')^{-1},hh')$.
This is again a group extension and it is isomorphic to E.
One can show that all extensions are of the type I just constructed for a given cocycle, up to isomorphism.
The extensions in the same isomorphism class differ only by a coboundary.
A good reference would be Weibel's homological algebra book.
To have an extension with a topological group structure implies that the corresponding cocycle is continuous and in general, this can not be expected. Observe that continuity doesn't follow from the axioms for 2-cocycles and depends on the topological structures of G and H, which you don't want to change.
So I think, it's wrong in general as well as for central extensions, which would be the case of a trivial H-action on G, where you still don't get any continuity for free. At the same time, I don't know of any trivial counter-example. You might take any non-continuous map from the real numbers times real numbers to the real numbers and form the corresponding "twisted" semi-direct product as sketched above. Then you can not get a topological group structure on the extension such that the extension is in the category of topological groups.
As for the smooth case, the same idea applies, where one would need the cocycle to be smooth as well.