The answer is yes if $X$ is a subspace.
If $X$ is a subspace then, since $X$ is dense in $L^2(\mathbb{R})$, we have that the $\|\cdot\|_2$-completion of $X$ is precisely $L^2(\mathbb{R})$. If $T$ were bounded then by the Riesz representation theorem, there would exist a unique $g \in L^2(\mathbb{R})$ such that $Tf = \langle f, g\rangle, \forall f \in X$. But the only candidate for such a function is $g \equiv 1$ which is not in $L^2(\mathbb{R})$ so $T$ is not bounded on $X$.
Now we can conclude that $\ker T$ is dense in $X$. Namely, let $(f_n)_n$ be a sequence such that $\|f_n\| = 1$ and $|T(f_n)| \ge n, \forall n\in\mathbb{N}$. Pick arbitrary $f \in X$. Then $\left(f - \frac{Tf}{Tf_n}f_n\right)_n$ is a sequence in $\ker T$ which converges to $f$.
Finally, since $\ker T$ is dense in $X$ and $X$ is dense in $L^2(\mathbb{R})$, if follows that $\ker T$ is dense in $L^2(\mathbb{R})$.