At least for Polish groups, which was the case I was most interested in, the answer is positive.

I mentioned this question to Ola Kwiatkowska yesterday and she immediately pointed out that one of the standard universal Polish groups, the group $\mathrm{Iso}(\Bbb U)$ of isometries of the Urysohn space, is in fact not only amenable, but even extremely amenable (and Polish subgroups of Polish groups are closed).

For arbitrary groups I still expect the answer to be positive, but I have no meaningful comments to make about that case, apart from the fact that if a group embeds as a closed subgroup into an amenable group $G$, then it also embeds as a closed subgroup into an extremely amenable group, namely $L^0(G,X,\mu)$.

**Edit (13/03/2024):**

It is indeed true that every topological group embeds as a topological subgroup into an (extremely) amenable group, this follows from a generalization of the argument for Polish groups mentioned above. Uspenskij proved (see Theorem 1.7 here) that for every topological group $G$ there exists a "generalized Urysohn space" $U$ such that $G$ is isomorphic to a subgroup of $\mathrm{Iso}(U)$, while Pestov proved (see Theorem 6.6 here) that $\mathrm{Iso}(U)$ is extremely amenable for all those generalized Urysohn spaces (see also Corollary 6.7 and 6.8 in Pestov's paper).