Let $X$ be a complete metric space, and let $Y ⊆ X$ be a metric subspace. Suppose $g: X \rightarrow Y$ is an isometry. Does this imply that $\bar{Y} = X$? i.e. that $Y$ is dense in $X$?
Suppose that $Y$ is not dense in $X$, i.e. that $g$ maps $X$ onto a proper subset of itself. Now $g$ is an isometry, and therefore injective. In the case where $X$ is finite this would give a contradiction, but in the infinite case I do not see one.
Suppose $X=[0,\infty)$ and $g(x)=x+1$, then $g$ is an isometry, but the image is $Y=[1,\infty)$, which is not dense in $X$.
Note that, in fact, $Y$ must be closed in $X$, since $g^{-1}$ maps Cauchy sequences to Cauchy sequences. Hence, if $y_n=g(x_n)$ in $Y$ converges to $y$ in $X$, then $x_n$ is Cauchy with limit $x$. However, this gives $$ g(x)=\lim_{n\to\infty} g(x_n)=\lim_{n\to\infty} y_n=y$$
So $Y$ is simply a subspace of $X$ which is isometrically isomorphic to $X$.