This is a very incomplete answer. I feel the appropriate mathematical construction of portals should be slightly different from above.
1) The player moves around in an embedded compact connected $3$-manifold $M \subset \mathbb R^3$ which has as boundary a closed two manifold $N=\partial M$.
2) The Aperture Science Handheld Portal Device acts on $M$ by an operation similar to the connected sum operation acting only on the boundary. We obtain the new space $M'$ by taking a pair of disjoint (homeomorphic to) $2$-disks $D_1, D_2 \subset N$ (the portals) and gluing them via a homeomorphism $\phi: B_1\to B_2$ i.e. the quotient topology on
$$
M'=\frac{M}{\{x \sim \phi(x)\}_{x \in B_1}}
$$
The character now moves in a 3-manifold $M'$ with closed boundary
$$
\partial M' = \frac{N-B^\circ_1-B^\circ_2}{\{x \sim \phi(x)\}_{x \in \partial B_1}}
$$
The possibilities for the $3$-manifold are probably limited to the surface possibilities, but because the surface need not be connected it's classification is not so simple. I think you'd have to know how to use Thurston's geometrization conjecture (now Theorem? a la Perelman) to determine the classes of portal-gun obtainable manifolds.
Starting from $M$ you can add a handle, and definitely with $n$ portal guns and starting with the $3$-disk you can obtain the fill of the orientable surface genus $n$. You can also connect the components of the boundary with portals until $\partial M$ is connected, but you can't go the other direction and disconnect the boundary. Then the obtainable spaces depend a lot on the starting space.
I don't remember exactly the game mechanics but I think in game the blue/orange portal/antiportal forces $\phi$ to be orientation preserving. But I see no reason you couldn't program the game to allow orientation reversing portals where you can come out with left and right switched. In that case you would also have to include the nonorientable surfaces/3-manifolds. Complicated.