You can define the product of an arbitrary family $(G_i)_{i \in I}$ of topological groups $G_i$ by equipping the group-theoretic product $G = \prod_{i \in I} G_i$ with the product topology; the product topology is indeed compatible with the group structure (confer Bourbaki, General topology, III.2.9, but it's pretty obvious actually).
Perhaps your problem is the product topology? Note that a basis for the product topology are the sets $(U_i)_{i \in I}$ where $U_i \subseteq G_i$ is open and $U_i = G_i$ for all but finitely many $i \in I$. (confer wiki for the product topology).