To elaborate on Hagen's answer. If the quotient space, $Y$, is hausdorff, its diagonal is closed.
Now, a quotient space is associated with a continuous quotient map,
$\pi : X \rightarrow Y$.
From continuity, an open set $U \in Y$, $\pi^{-1}(U)$ is open in $X$.
Now we an create a map from $f: X \times X \rightarrow Y \times Y$ with
$f(x_1,x_2) = \pi(x_1),\pi(x_2)$ which is also continous.
Now the off-diagonal elements in $Y\times Y$ form an open set as it is the complement of the closed diagonal.
So now $f^{-1}(Y\times Y \setminus D)$ is open, where $D$ is the diagonal.
This is also the complement of the set $X \times X : x_1 \sim x_2$. Therefore $X \times X : x_1 \sim x_2$ is closed.