Question: I was trying to prove that, given a family $\{(X_i, \mathcal{T}_i) \}_{i \in I}$ of topolgical spaces and the product topology $(X, \mathcal{T})$ of these spaces, if $X$ is Hausdorff, then each $X_i$ is also Hausdorff.
My Attempt: In order to prove this, we notice that the coordinate projection $\pi_i: X \to X_i$ (which is continuous by definition) is also an open map, so it maps open sets from $X$ to open sets in $X_i$. It is also surjective, so we claim $X_i$ is Hausdorff by this means. More precisely, if $\pi_i(x) \neq \pi_i(y)$ in $X_i$ (assuming $\pi_i$ is actually surjective), there are disjoint open sets $U_x, U_y \in \mathcal{T}$ for which $x \in U_x$ and $y \in U_y$. Thus, $\pi_i(U_x \bigcap U_y) = \pi_i(U_x) \bigcap \pi_i(U_y) = \emptyset$ and $\pi_i(U_x), \pi_i(U_y)$ are both open, since $\pi_i$ is an open map. Therefore, $X_i$ is Hausdorff with the above two disjoint open sets $\pi_i(U_x)$ and $\pi_i(U_y)$ separating $\pi_i(x)$ and $\pi_i(y)$.
Doubts: An error in the above proof would be that $\pi_i$ is not necessarily surjective, but I'm not sure if this is the case. I did find an exercise from Willard's book "General Topology", (exercise 8F. 2) in particular) which states: "Assuming the axiom of choice, show that each projection is onto if each factor space is nonempty." This has increased my doubts about the above proof, since there is no assumption that the spaces in the product are nonempty.
You are right, there is an implicit assumption that the spaces are non-empty.
The problem is false if the spaces can be empty: pick $X_1$ to be non-Haussdorff and $X_2=\emptyset$. Then $X=X_1 \times X_2=\emptyset$ is Haussdorff, but $X_1$ is not.
If $X_i$ are non-empty, the claim follows along your reasoning.