5 Answers
5

For a generalisation, one can easily show that every Hausdorff space can be embedded as a dense subset of a non-Hausdorff space. Given a Hausdorff space $X$, define a new space $Y = X \cup \{ \alpha , \omega \}$ so that the open sets are just the open sets of $X$ together with the whole space $Y$. Then $X$ is clearly a dense subspace of $Y$ (the only neighbourhood of either $\alpha$ or $\omega$ is the entire space $Y$), and $Y$ is not Hausdorff (actually, it is not even T$_0$, since $\alpha$ and $\omega$ have exactly the same open neighbourhoods).

For a slightly less trivial example, consider $X = [0,1] \cup \{1'\}$, where $1'$ is an "extra copy of $1$" so that basic neighbourhoods of $1'$ are $\{1'\} \cup (1-\epsilon,1)$
for any $\epsilon > 0$. On $[0,1]$, the usual topology is taken. Then $[0,1]$ is
a dense subspace which is Hausdorff, but $X$ is not Hausdorff because $1$ and $1'$ don't have disjoint neighbourhoods.

Algebraic geometers will smile and think of the generic point of their favourite irreducible scheme...

[For non algebraic geometers: a scheme is the basic object studied in algebraic geometry.
It has an underlying topological space which is almost never Hausdorff.
Very often however a scheme $X$ has a so-called generic point $\eta\in X$, such that the singleton set $\{\eta\}$, obviously a Hausdorff subspace, is dense in $X$. The scheme $X$ is then called irreducible.
I am answering the question in order to show that the situation arises in real (mathematical) life, contrary to what some (excellent) other answers might suggest.]