It is well-known that if a Banach space $X$ is reflexive and separable, then its dual $X'$ is separable. My question is more concrete, but for clarity, I am going to state a few questions going from most general to most concrete:
Suppose it is known that the Banach space $X$ is reflexive, and a subspace $Z$ of $X$ is dense in $X$. Let $T:Z\rightarrow X'$ be an arbitrary injective embedding. Does it follow that $T(Z)$ is dense in $X'$? Answer: No (see Nate's comment).
Suppose $X$ is a Hilbert space, and $Z$ is a subspace of $X$ which is dense in $X$. Do not identify $X$ with its dual. Furthermore, suppose that there exists a map $T:X\rightarrow X'$ such that the elements of $T(Z)$ coincide with a subset of those of $Z$. Does it follow that $T(Z)$ is dense in $X'$?
Suppose $X$ is a Hilbert space whose elements are measurable functions and such that the elements of a subspace $Z$ of $X$ coincide with those of $C_c^{\infty}$, and $Z$ is dense in $X$. Do not identify $X$ with its dual. Furthermore, suppose that the elements of a subspace $Z'$ of $X'$ coincide with those of $C_c^{\infty}$. Does it follow that $Z'$ is dense in $X'$?
Note that in the concrete case of question 3 with $X=H^1=W^{1,2}(\mathbb R^n)$, the question has been resolved with answer "yes", by reuns below.
I am most interested in the answer to question 3, in the general setting.
For $W^{1,2}$ you can try something like this :
As $C^\infty_c$ is dense in the distributions, it is more or less obvious $C^\infty_c$ is dense in the weak dual of $H^1 = W^{1,2}$ the Hilbert space with norm $\|f\|_{H^1}^2 = \|f\|_{L^2}^2+\|f'\|_{L^2}^2$.
So the question is if it is also dense in the strong dual.
With the Fourier transform $$\|f\|_{H^1}^2 = \int_{-\infty }^\infty |\widehat{f}(\xi)|^2d\xi +\int_{-\infty }^\infty |\widehat{f}(\xi)|^24 \pi^2 \xi^2 d\xi = \|\widehat{f} \sqrt{1+4 \pi \xi^2}\|^2_{L^2}$$ Thus its strong dual is $H^{-1}$ the Hilbert space with norm $\|g\|_{H^{-1}}^2 = \|\frac{\textstyle\widehat{g} }{\sqrt{1+4 \pi \xi^2}}\|^2_{L^2}$. It is not hard to check the Schwartz space is dense on the Fourier side for the $\|\frac{. }{\sqrt{1+4 \pi \xi^2}}\|^2_{L^2}$ norm, and as the Schwartz space is its own Fourier transform, the Schwartz space is dense in $H^{-1}$, and so is $C^\infty_c$.