Although the theory of Lie groups (topological groups where the underlying space is a manifold and the group operations are smooth) goes back to around 1870 the theory of topological groups in a more general sense seem not to have been considered until 1925 when Leja and Schreier, independently, made the basic definitions, rather in the spirit of Fréchet, and since then this too has developed into a major branch of modern mathematics.
It was Weil (1937) who wrote the first definitive study of uniform spaces and applied the theory to both metric spaces and topological groups. However the basic idea was already emerging early in the century, indeed the concepts of uniform continuity and uniform convergence were well understood by Weierstrass and by Cauchy before him.