Assume that $Y$ is Hausdorff. Then consider the diagonal
$$\Delta_Y:=\{(..,y,y,y,..)_\alpha\,\mid\, y\in Y\}\ \subseteq Y^I$$
It is closed, because whenever $x=(x_\alpha)\notin \Delta_Y$, we have $x_\alpha\ne x_\beta$, so there are disjoint open sets $U$ and $V$ around $x_\alpha$ and $x_\beta$, so
$$x\in Y\times Y\times \dots\times U\times\dots\times V\times\dots\times Y\times Y\times\dots$$
which is open and disjoint from $\Delta_Y$.
So, we have that $\Delta_Y\,\cap\,\prod_\alpha X_\alpha$ is closed in $\prod_\alpha X_\alpha$ w.r.t. to the subspace topology. And, finally
$$\Delta_Y\,\cap\, \prod_\alpha X_\alpha\ =\ \Delta_{\left(\bigcap_\alpha X_\alpha \right)}
\ \cong\ \bigcap_\alpha X_\alpha\,.$$