There is a more topological way. If you assume that $X$ admits a universal covering $\tilde X$ (so $X$ is path connected and semilocally simply connected, I believe) then the $G=\pi_1(X)$ is realized by the deck transformations, i.e. the self-homeomorphisms of $X$ that preserve the fibers of $p:\tilde X \to X$.
I am a bit worried, however, that my answer simply sweeps basepoints under the rug. They are certainly used in the construction I know of the universal cover $\tilde X$, but we can forget about them afterwards and simply use the covering map $p$.
**Edit: ** I still think this works, but I'm not sure if this construction is functorial in the sense you need.