Following my comment above:
Let $S$ be some nonempty proper subset of $\mathbb{R}$ that is a union of equivalence classes. Since it is non-empty it contains at least one point, call this $x$. Since it is a proper subset, there is an element $y\in \mathbb{R}\setminus S$.
In order to show that $S$ is not open, it suffices to show that every open ball of radius $r>0$ centred at $x$ is not contained in $S$. Can you show this?