You don't need any assumptions to show that for every topological space $X$, $C_0(X)$ is a closed subspace of $C_b(X)$. Since $C_b(X)$ is a Banach space, endowed with the supremum norm, it suffices to show that the limit of every uniformly convergent sequence of functions vanishing at infinity also vanishes at infinity.
So let $(f_n)$ be a sequence in $C_0(X)$, converging uniformly to $f \in C_b(X)$. Let $\varepsilon > 0$ be given. By the uniform convergence, there is an $N$ such that $\lVert f_N - f\rVert_{\infty} < \varepsilon/2$. Since $f_N \in C_0(X)$,
$$K_{N,\varepsilon/2} := f_N^{-1}(\{ z : \lvert z\rvert \geqslant \varepsilon/2\})$$
is a closed (quasi)compact subset of $X$. Then
$$M_{\varepsilon} := f^{-1}(\{ z : \lvert z\rvert \geqslant \varepsilon\})$$
is a closed - by continuity of $f$ - subset of $K_{N,\varepsilon/2}$, and hence (quasi)compact.
Since $\varepsilon > 0$, it follows that $f \in C_0(X)$.
However, on many spaces, $C_0(X)$ is a rather boring space - namely the trivial vector space. For if there is an $f \in C_0(X) \setminus \{0\}$, then for small enough $\varepsilon > 0$ the set $f^{-1}(\{ z : \lvert z\rvert \geqslant \varepsilon\})$ is a compact subset of $X$ with nonempty interior. In infinite-dimensional Hausdorff topological vector spaces, no compact subset has nonempty interior. So $C_0(L_2(\Omega)) = \{0\}$ (unless $L_2(\Omega)$ is finite-dimensional, which happens for certain measures).
A very natural example where $Y$ is not open in $X$ is $X=\mathbb{R}$, $Y=\mathbb{R}\setminus\mathbb{Q}$. Here is it not obvious that $Y$ actually is completely metrizable; one way to prove it is to use continued fractions to show that $Y$ is actually homeomorphic to $\mathbb{N}^{\mathbb{N}}$.
For a very simple example where $Y$ is not dense and also not $G_\delta$ in $X$, let $X=[0,1]^I$ for an uncountable set $I$ and let $Y$ be a singleton. Then $Y$ is trivially completely metrizable, but it is not $G_\delta$ since any intersection of fewer than $|I|$ basic open neighborhoods of a point of $X$ is still unconstrained on some coordinates.
Best Answer
Answering so that this isn't unanswered. In the comments, Alex Ravsky suggested the following example which was just what I needed.
Consider any infinite group $G$ equipped with the cofinite topology. Then the multiplication map $G \times G \rightarrow G$ defined by $(x,y) \mapsto xy$ is separately continuous everywhere, but is not jointly continuous at any point.