Take a Hausdorff topological space $X$, and two distinct points $p,q \in X$. Is there a continuous function $f: X \to \mathbb{R}$ such that $f(p) \neq f(q)$?
The answer is probably no, but I don't have a ready-made counterexample. As soon as we add the adjective "compact" the space $X$ becomes normal, so that the Urysohn lemma applies, and it gives us such a function.
So the place to look is Hausdorff spaces that are not regular/normal. However, the examples of these that I know are often constructed as finer topologies on the real line, and so come equipped with a ready made map to $\mathbb{R}$ that separates points.