If $d$ is a metric for the Polish space $X$ and if $\left \{ x_n \right \}_n$ is a countable dense subset of $X,$ then it is easy to see that the map $f:x\mapsto \left \{ \min(1,d(x,x_n)) \right \}_n$ is a homeomorphism onto a subset $Y$ of $[0,1]^{\mathbb N}$.
My problem is showing that $Y$ is a $G_{\delta }.$ $Y$ cannot be closed because this would imply that $X$ is compact, but if I could show that the $Y=\overline Y\cap \left \{ y\in [0,1]^{\mathbb N}:osc _{f^{-1}}(y)=0 \right \},$ that would do it.
On the other hand, the result follows immediately from Lavrentiev's theorem because appealing to it, we can find a $G_{\delta }$ set $G$ such that $Y\subset G$ and $f(X)=G, $ which is only possible if $G=Y.$
This seems like cheating, though, especially because the aforementioned theorem is not trivial. Does anyone have another argument?