Every topological space can be realized as the quotient of some Hausdorff space.
(Note: This construction is not mine; it is a slight modification of Brian M. Scott's deleted answer, which is in turn a variation on Shimrat (1956) as linked by Slade.)
The key step is the following lemma:
For any set $X$, there is a Hausdorff space $Y=\bigcup_{x\in X} Y_x$ such that the $Y_x$ are disjoint from each other and dense in $Y$.
Proof: Brian's original answer used the set $Y=X^\Bbb N$ with $Y_x=\{f\in Y\mid \exists n\in\Bbb N:f(n)=x\}$, but these sets are not disjoint. Instead, we can take any Hausdorff resolvable space $Z=A\sqcup B$ where $A,B$ are each dense in $Z$ (for example $Z=\Bbb R$, $A=\Bbb Q$, $B=\Bbb R\setminus\Bbb Q$), and set $$Y_x=\{f:X\to Z\mid f(x)\in A\land\forall y\ne x: f(y)\in B\}.$$
These are disjoint because $A$ and $B$ are, and each $Y_x$ is dense in $Z^X$ because any nonempty open set of $Z^X$ contains some $\prod_{y\in X}U_y$ where the $U_y$ are all nonempty open in $Z$; then picking $a_y\in U_y\cap A$ and $b_y\in U_y\cap B$ the function $f(y)=\begin{cases}a_y&x=y\\b_y&x\ne y\end{cases}$ is in $\prod_{y\in X}U_y\cap Y_x$. (Only finitely many choices need be made, since there are only finitely many distinct $U_y$ - most of them are equal to $Z$.) The product is Hausdorff because it is a product of Hausdorff spaces.
Now we turn to the main theorem:
For any topological space $X$ there is a Hausdorff space $\hat X$ and a quotient map $\pi:\hat X\to X$.
Take $Y$ from the lemma, using the set $X$ treated as a discrete set, and set $\hat X=\bigcup_{x\in X}\{x\}\times Y_x$ and $\pi(x,y)=x$. Since $\hat X$ is a subspace of $X\times Y$, and $\pi$ is a restriction of the left projection function, it is continuous. $\hat X$ is also Hausdorff because for any $(x,y)\ne (x',y')$, if $y=y'\in Y_x\cap Y_{x'}$ then $x=x'$, a contradiction, so $y\ne y'$ and we can choose $y\in U, y'\in U'$ with $U\cap U'=\emptyset$ and use the sets $(X\times U)\cap\hat X$, $(X\times U')\cap\hat X$.
To show that $\pi$ is open, take a basis element for the topology of $\hat X$, that is, a set of the form $T=(U\times V)\cap\hat X$ where $U\subseteq X, V\subseteq Y$ open. Then $\pi[T]\subseteq U$, and I claim that $\pi[T]=U$ so that $\pi[T]$ is open. Given $x\in U$, since $Y_x$ is dense in $Y$ there is a $y\in Y_x\cap V$, thus $(x,y)\in (U\times V)\cap\hat X=T$ and $\pi(x,y)=x\in\pi[T]$.
Corrected version.
Let $\langle X,\tau\rangle$ be any infinite space. For each $x\in X$ let $D_x$ be a copy of the discrete two-point space $\{0,1\}$, and let $Y=\prod_{x\in X}D_x$. Let $\kappa=|X|$.
- Show that $Y$ has a base of cardinality $\kappa$.
- Show that each non-empty open set in $Y$ has cardinality $2^\kappa>\kappa$.
Let $X=\{x_\eta:\eta<\kappa\}$ and $\kappa\times\kappa=\{\langle\alpha_\xi,\beta_\xi\rangle:\xi<\kappa\}$, and let $\mathscr{B}=\{B_\xi:\xi<\kappa\}$ be a base for $Y$ of cardinality $\kappa$. Suppose that $\eta<\kappa$, and we’ve chosen distinct points $y_\xi\in Y$ for $\xi<\eta$ such that $y_\xi\in B_{\alpha_\xi}$. Then $B_{\alpha_\eta}\setminus\{y_\xi:\xi<\eta\}\ne\varnothing$, so we may choose $y_\eta\in B_{\alpha_\eta}\setminus\{y_\xi:\xi<\eta\}$. This recursive construction gives us a family $\{y_\xi:\xi<\kappa\}$ of distinct points of $Y$ such that $y_\xi\in B_{\alpha_\xi}$ for each $\xi<\kappa$. For each $\eta<\kappa$ let
$$Y_\eta=\{y_\xi:\beta_\xi=\eta\}\;.$$
- Show that each $Y_\eta$ is dense in $Y$, and that the sets $Y_\eta$ are pairwise disjoint.
Let $\hat Y=\bigcup_{\eta<\kappa}Y_\eta$, let $Z$ be the product of $\langle X,\tau\rangle$ and $\hat Y$, and let $\hat X=\{\langle x_\eta,y\rangle\in Z:y\in Y_\eta\}$.
- Show that $\hat X$ is Hausdorff; the pairwise disjointness of the sets $Y_\eta$ is critical here.
Now let $\pi_X:\hat X\to X:\langle x,y\rangle\mapsto x$ be the projection; $\pi_X$ is automatically continuous and open.
- Show that $\pi_X$ is a surjection, so that $X$ is a quotient of $Z$. (This is where you use the fact that each $Y_\eta$ is dense in $Y$ and hence in $\hat Y$.)
Let me elaborate on the comment of mine that Slade mentioned above. Using convergence of ultrafilters, there is a very conceptually simple way to do this. First, let us suppose $X$ is a $T_1$ space. Then the topology on $X$ is completely determined by the convergence of nonprincipal ultrafilters on $X$: for each nonprincipal ultrafilter $F$ on $X$, there is some subset $L(F)\subseteq X$ of points that $F$ converges to, and the topology on $X$ is the finest topology such that $F$ converges to $x$ for each $F$ and each $x\in L(F)$. Given a nonprincipal ultrafilter $F$ on $X$ and a point $x\in X$, we can let $X_{F,x}$ be $X$ equipped with the finest topology for which $F$ converges to $x$. Explicitly, every point in $X_{F,x}$ is open except $x$, and the neighborhoods of $x$ are the sets in $F$. Since $F$ is nonprincipal, this topology is Hausdorff. We can form the disjoint union $Y=\bigsqcup X_{F,x}$ where $(F,x)$ ranges over all pairs of a nonprincipal ultrafilter $F$ and a point $x\in L(F)$. There is then a canonical continuous map $p:Y\to X$ which is the identity map on each $X_{F,x}$. Since $p$ is continuous with respect to a topology on $X$ iff $F$ converges to $x$ for each $(F,x)$, we conclude that the given topology on $X$ is the finest topology that makes $p$ continuous. That is, $p$ is a quotient map.
What can we do if $X$ is not $T_1$? Well, we just have to detect the convergence of principal ultrafilters as well. For instance, for every pair $(x,y)\in X\times X$ such that the principal ultrafilter at $x$ converges to $y$, we could take the space $\mathbb{N}\cup\{\infty\}$ and map each element of $\mathbb{N}$ to $x$ and $\infty$ to $y$. This map is continuous with respect to a topology on $X$ iff the principal ultrafilter at $x$ converges to $y$. So we can let $Z$ be the disjoint union of the $Y$ constructed above and a copy of $\mathbb{N}\cup\{\infty\}$ for each such $(x,y)$, and define a map $q:Z\to X$ as the joining of of $p$ and the maps defined above. Then by a similar argument as in the $T_1$ case, $q$ is a quotient map.
(Note that the use of ultrafilters (and thus of the axiom of choice) can be eliminated by using all convergent filters containing the cofinite filter, rather than just nonprincipal ultrafilters. In fact, it suffices to just consider for each point $x\in X$ the pair $(F,x)$, where $F$ is the filter generated by the neighborhoods of $x$ and the cofinite sets.)