"Naturally occurring" non-Hausdorff spaces? It is not difficult for a beginning point-set topology student to cook up an example of a non-Hausdorff space; perhaps the simplest example is the line with two origins. It is impossible to separate the two origins with disjoint open sets.
It is also easy for a beginning algebraic geometry student to give a less artificial example of a non-Hausdorff space: the Zariski topology on affine $n$-space over an infinite field $k$, $\mathbf{A}_{k}^{n}$, is not Hausdorff, due to the fact that polynomials are determined by their local behavior. Open sets here are in fact dense.
I am interested in examples of the latter form. The Zariski topology on $\mathbf{A}_{k}^{n}$ exists as a tool in its own right, and happens to be non-Hausdorff. As far as I'm aware, the line with two origins doesn't serve this purpose. What are some non-Hausdorff topological spaces that aren't merely pathological curiosities?
 A: In geometric group theory, specifically in the study of the outer automorphism group of a finite rank free group, one studies a finite, connected graph $\Gamma$ in which every vertex has valence $\ge 3$, such that $\Gamma$ is of rank $n \ge 2$ meaning that its fundamental group is a free group of rank $n$.
In their work on the Tits alternative for the outer automorphism group $\text{Out}(F_n)$, Bestvina, Feighn and Handel study the space of lines $\mathcal B(\Gamma)$, an important non-Hausdorff space for analyzing the dynamics of elements of $\text{Out}(F_n)$.
Here's a quick description of $\mathcal B(\Gamma)$. A parameterized line in $\Gamma$ is a bi-infinite, indexed edge path $\cdots E_{i-1} E_i E_{i+1} \cdots$ without backtracking, meaning that $E_{i+1}$ is not equal to the reversal of $E_i$. The set of parameterized lines is given a topology which, roughly speaking, is the compact open topology. Then one forms a quotient: two parameterized lines are equivalent if they are related to each other by either shifting the parameter, or reversing the edge path, or a combination of both. This quotient space is not Hausdorff.
Inside the set $\mathcal B(\Gamma)$ one encounters important subsets having the property that the subset is uncountable and yet is the closure of a single point. Such subsets occur in a dynamical context as the attracting laminations of elements of $\text{Out}(F_n)$, analogous to Thurston's unstable geodesic laminations in the context of surface mapping class groups, or to expanding eigenvectors in the context of linear transformations.
A: I'm far from an expert, but an interesting place where non-Hausdorff manifolds arise is in the study of Lie groupoids. The holonomy and monodromy groupoids of foliations on manifolds can often have non-Hausdorff spaces of arrows - for example, this is the case for the Reeb foliation of $S^3$. This also comes up in the problem of integration of Lie algebroids to Lie groupoids - for instance, Lie algebra bundles always have a source-simply connected integration (to a bundle of Lie groups) which can be non-Hausdorff.
A: If you consider a dynamical system, i.e. a group acting continuously on a compact Hausdorff space, then the automorphism group (called the Ellis group) has a natural compact $T_1$ semitopological group topology, which is usually not Hasudorff.
A: There are finite spaces that model the homotopy theory of finite simplicial complexes.  Since simplicial complexes can model so much of what a topologist might think of as the "good" spaces for doing homotopy theory, it might be a bit of a surprise that finite spaces suffice in some sense.
It essentially began with McCord and Stong in 1966.  (Interestingly, they came about these results nearly independently and at the same time:  Stong mentions McCord's result as a preprint in his paper.)  At any rate, McCord proved the following, the proof of which is constructive:
Theorem:  Given any finite simplicial complex $K$, there exists a finite topological space $X$ and a weak homotopy equivalence $f: |K| \to X$.  The converse holds as well (starting with $X$, constructing $K$).
Of course, $X$ will be non-Hausdorff as soon as it is not discrete (as all the interesting ones are).
Hence, finite spaces have the same homotopy and singular homology groups as finite simplicial complexes.  In particular, there are finite spaces weakly homotopy equivalent to the $n$-spheres.  This finiteness might give one some more control over the behavior of the spaces involved.  This idea has been pushed by Hardie, Witbooi, et al, who have been able to find finite models for decidely-not-finite constructions like the Hopf map $\eta: S^3 \to S^2$ and the non-trivial element of $\pi_5(S^3)$.  There may be several more recent applications that I am not aware of since getting old.

McCord, Michael C. Singular homology groups and homotopy groups of finite topological spaces. Duke Math. J. 33 (1966), 465–474.
Stong, R. E. Finite topological spaces. Trans. Amer. Math. Soc. 123 (1966), 325–340.
Hardie, K. A.; Vermeulen, J. J. C.; Witbooi, P. J. A nontrivial pairing of finite $T_0$ spaces. Topology Appl. 125 (2002), no. 3, 533–542.
Hardie, K. A.; Witbooi, P. J. Crown multiplications and a higher order Hopf construction. Topology Appl. 154 (2007), no. 10, 2073–2080.
A: The digital line is a non-Hausdorff space important in graphics.  The underlying set of points is just $\mathbb{Z}$.  We give this the digital topology by specifying a basis for the topology.  If $n$ is odd, we let $\{n\}$ be a basic open set.  If $n$ is even, we let $\{n-1,n,n+1\}$ be basic open.  These basic open sets give a topology on $\mathbb{Z}$, the resulting space being the "digital line."  The idea is the odd integers $n$ give $\{n\}$ the status of a pixel, whereas the even $n$ encode $\{n-1,n,n+1\}$ as pixel-boundary-pixel.  Thus this is a sort of pixelated version of the real line.
At any rate, this gives a topology on $\mathbb{Z}$ which is $T_0$ but not $T_1$ (and hence non-Hausdorff).  That it is not Hausdorff is clear, since there is no way to separate $2$ from $3$.  It also has tons of other interesting properties, such as being path connected, Alexandrov, and has homotopy and isometry similarities to the ordinary real line.

References added:
R. Kopperman T.Y. Kong and P.R. Meyer, A topological approach to digital topology, American Mathematical Monthly 98 (1991), no. 10, 901-917.
Special issue on digital topology. Edited by T. Y. Kong, R. Kopperman and P. R. Meyer. Topology Appl. 46 (1992), no. 3. Elsevier Science B.V., Amsterdam, 1992. pp. i–ii and 173–303.
Colin Adams and Robert Franzosa, Introduction to topology: Pure and applied, Pearson Prentice Hall, 2008.
A: In computer science, more specifically in programming languages theory, it is common to describe the behavior of computer programs using Scott-continuous functions, i.e. continuous functions between two topological spaces having the Scott topology. Roughly put, these are partially ordered sets where open sets are upper sets (if a point is in the set, all the larger points must be as well) which are inaccessible by directed suprema (the supremum of points outside the open set must also be outside). Equivalently: closed sets are lower sets closed under directed suprema.
This topology is in general not Hausdorff, since if $x < y$ any open set including $x$ must also contain $y$. More precisely, it is Hausdorff iff the order is trivial.
The Scott topology is a very important tool to provide a rigorous meaning to programs that may fail to terminate, either because they can get stuck in an infinite loop or in an infinite chain of recursive calls. The meaning of such program constructs is typically defined exploiting the Kleene fixed point theorem so to solve the "recursive equations" which arise from the self-referent (recursive) program.
A: Any seminormed space that is not normed is non-Hausdorff.  For example, the space of functions $\mathscr{L}^1([0,1])$ with the seminorm (i.e., Lebesgue integrable functions, not equivalence classes of functions).  Although we often blur the distinction between $L^1$ and $\mathscr{L}^1$, there are times when this is important.
A: One class of naturally arising examples is the class of quotient spaces. For instance, suppose you have an action of a group $G$ on a topological space $X$, and you give the quotient space $X/G$ of $G$-orbits on $X$ the quotient topology (in which a subset is open if and only if its pre-image is open).
Two points $Gx, Gy \in X/G$ may be separated by open sets only if there are disjoint open sets $U$ and $V$ of $X$ separating the orbits $Gx$ and $Gy$. Thus for instance if you consider the $\mathbf{C}^\times$-action on a finite dimensional complex vector space $V$, the orbits are of two types: first, the unique closed orbit, which is a single point consisting of the origin, and second, the set of non-zero points on each line passing through the origin. Orbits of the second type may be separated from one another by open sets (which explains why complex projective space with this classical topology is Hausdorff), but none of them is separated from the origin by an open set. Hence the quotient space is not Hausdorff (geometric invariant theory is, in part, concerned with fixing this problem; c.f. the answer of Tabes Bridges for the scheme-theoretic version of this).
A: This is a really small example, but the Sierpiński space is non-Hausdorff. Explicitly, it is the space $\Sigma := \{0,1\}$ where the open sets are $\varnothing, \{1\}, \{0,1\}$. What makes it (slightly) more than just a pathology is that it's the representing object of the functor $\operatorname{Op}:\mathbf{Top}^{\mathrm{op}}\to\mathbf{Set}$ sending a topological space $X$ to its set of opens, and a continuous map $f:X\to Y$ to the preimage map $f^{-1}:\operatorname{Op}(Y)\to\operatorname{Op}(X)$; in other words, the open sets of a topological space $X$ are naturally identifiable with the continuous maps $X\to\Sigma$, the identification sending a map $f:X\to\Sigma$ to the open set $f^{-1}(1)$.
This being said, my example is arguably also just a special case of Alekos' answer since $\Sigma=\operatorname{Spec}R$ for $R$ a discrete valuation ring, but I like it for its categorical incarnation.
A: This is similar to the variety example of $\Bbb{A}^n_k$. The topology on a scheme $X$ is almost never Hausdorff.
Indeed, if $X=\operatorname{spec}(A)$ is an affine scheme ($\operatorname{spec}(A)$ denotes the set of prime ideals of $A$) then we define a topology by taking $V(\mathfrak{a})=\{\text{primes}\:\mathfrak{p}\supseteq \mathfrak{a}\}$ for $\mathfrak{a}$ an ideal to be the closed sets. If $\operatorname{spec}(A)$ contains a pair of primes $\mathfrak{p}$ and $\mathfrak{q}$ so that $\mathfrak{p}\supsetneq \mathfrak{q}$, then every closed set containing $\mathfrak{q}$ contains $\mathfrak{p}$ also. Hence, every open set containing $\mathfrak{p}$ contains $\mathfrak{q}$. The consequence is that unless the poset of primes in $\operatorname{spec}(A)$ looks like
$$ \bullet\:\:\bullet\:\:\bullet\:\:\bullet\:\:\cdots\:\:\bullet$$
you should not expect this topology to be Hausdorff.
It gets even worse. If $A$ is an integral domain, then $(0)$ is a prime ideal and it is a prime ideal that is contained in every open set. So, $\{(0)\}$ is dense in $X=\operatorname{spec}(A)$.
A: Here is an example not mentioned yet: the étale space of a sheaf on a (topological, ringed, etc) space is generally not Hausdorff. For a concrete example, consider the sheaf $\mathcal{F}$ of continuous real-valued functions on $\mathbf{R}$. The étale space of $\mathcal{F}$ is the topological space consisting of:

*

*the set
\begin{align*}
E=\coprod_{x\in\mathbf{R}}\mathcal{F}_{x};
\end{align*}
that is, the coproduct of all stalks at $x$ over all $x\in\mathbf{R}$, and

*the topology determined by, for any open $U\subseteq\mathbf{R}$ and section $s\in\mathcal{F}(U)$, defining a basis element to be the set of all germs of $s$ at $x$ for all $x\in U$.

To see that $E$ is not Hausdorff, consider two distinct points in $E$:
\begin{align*}
f(x)&=0\\
g(x)&=\max\{x,0\}.
\end{align*}
The two functions are distinct, since their germs at $0$ are distinct, but their germs for $x<0$ are the same, and therefore any neighborhood of $0$ contains an $x$ where the germ of $f$ equals the germ of $g$. You can do a similar construction using bump functions when $\mathcal{F}$ is smooth functions.
The étale space is a natural thing to construct on a given sheaf $\mathcal{F}$ over a space $X$. This construction (once you define arrows) actually demonstrates an equivalence of categories between $\mathbf{Sh}_{X}$, the sheaves (of sets) on $X$ and the category of étale spaces over $X$. It also ties into questions about representability of functors: under the étale space construction, all sheaves over $X$ are representable in an interesting way: first note that there is a natural projection $\pi:E\to X$. There is a functor $\Gamma:\mathbf{Top}/X\to\mathbf{Set}$ that takes an object $f:Y\to X$ in the slice category to the set $(f^{-1}\mathcal{F})(Y)$, and there is a natural isomorphism $\Gamma(f)=(f^{-1}\mathcal{F})(Y)\cong\operatorname{Hom}_{\mathbf{Top}/X}(f,\pi)$, so $\pi$ represents $\Gamma$ in $\mathbf{Top}/X$.
A: This kind of answers the question but kind of doesn't depending on your perspective.
Anyway, you may know this but the failure of the Zariski topology to be Hausdorff has less to do with the nature of a given scheme and more to do with the fact that the Hausdorff condition should be understood as the specialization of the more general notion of separatedness to the category of topological spaces, where the "disjoint open sets" condition is equivalent. However the schemes one typically runs into are separated.
What you might be interested in, however, are non-separated schemes that arise in nature. These are plentiful in moduli theory; any time you have a flat family of varieties, sheaves, etc. over a punctured disc and there is a non-unique way to complete that family ("fill in the special fiber"), you have a non-separated moduli space. For instance if I have a flat, $1$-parameter family of curves and blow up a point in the special fiber, I get a different limit. Thus the moduli space/stack of all curves is horribly non-separated (keep blowing up/down and you will get more limits). To get a separated space you have to impose a stability condition, which is violated if you start randomly blowing things up.
On the other hand, the space of semi-stable sheaves (which compactifies moduli of stable sheaves) is still non-separated, and you have to impose a relation called S-equivalence which identifies any potential different limits.
A: In non-standard analysis, to any set $A$ there is an associated set $^*\!A$, which consists of the original set $A$ plus a bunch of new points infinitesimally close to $A$.  There are two natural topologies you can put on $^*\!A$, one of which (called the Q-topology) is Hausdorff if $A$ is, the other (called the S-topology) is always non-Hausdorff.  Both of these topologies are useful.
Intuitively, the Q-topology is what you get if you allow open balls in your topology on $^*\!A$ to have infinitesimal radius, and the S-topology is what you get if you only allow balls of standard (non-infinitesimal) radius.  The latter doesn't separate points that are infinitely close together, which is why it's non-Hausdorff.
A: Non-Hausdorff spaces appear naturally in the study of $C^*$-algebras. If $A$ is a $C^*$-algebra, we want to study $A$ by considering the space $X$ of primitive ideals of $A$, which we call its spectrum by analogy with algebraic geometry.
If $A$ is commutative, then every primitive ideal of $A$ is maximal and so $X = \operatorname{mSpec} A$, which is easily seen to be a compact Hausdorff space. Moreover, the functions on $X$ (in the sense of algebraic geometry, thus the elements of $A$ are in natural bijection with these functions) are exactly the functions $X \to \mathbb C$, since if $I$ is a maximal ideal of $A$, then $A/I = \mathbb C$. This cannot be the case for a noncommutative $A$ because one needs some "noncommutative functions".
Now if $A$ is noncommutative and $I$ is a primitive ideal of $A$, then $A/I$ is a simple $C^*$-algebra (i.e. a $C^*$-algebra which is simple in the sense of noncommutative rings, thus $A/I$ has no two-sided ideals), and so does not have to be a field. Often $A/I$ is a matrix ring such as $\mathbb C^{2 \times 2}$. As a consequence, there is no longer a guarantee that $X$ is Hausdorff.
One of my favorite examples of a non-commutative spectrum of a $C^*$-algebra arises from considering the action $\varphi$ of the group $\mathbb Z/2$ on the unit circle $S^1 = \{(x, y): x^2 + y^2 = 1\}$ by reflection across the $x$-axis $\{(x, 0)\}$. Now $C(S^1 \to \mathbb C)$ is a $C^*$-algebra consisting of functions on $S^1$, and $\varphi$ induces an action of $\mathbb Z/2$ on $C(S^1 \to \mathbb C)$. Whenever we have a group acting on a $C^*$-algebra we can take the semidirect product of the group and the $C^*$-algebra to get a new $C^*$-algebra.
Let $A$ be the semidirect product of $\mathbb Z/2$ and $C(S^1 \to \mathbb C)$. One can think of the spectrum of $A$ as the quotient of $S^1$ by $\varphi$, which gives the line segment $[-1, 1]$ obtained by deleting the $y$-coordinates of $S^1$. But there are two funny things about this line segment.
First, the functions on $\operatorname{Spec} A$ are noncommutative, and in fact are functions $\operatorname{Spec} A \to \mathbb C^{2 \times 2}$.
Second, not every function $\operatorname{Spec} A \to \mathbb C^{2 \times 2}$ appears in $A$. Indeed (up to a choice of isomorphism), one can show that every function $f: \operatorname{Spec} A \to \mathbb C^{2 \times 2}$ in $A$ satisfies $f(\pm 1) = \begin{bmatrix}1 & a\\ a & 1\end{bmatrix}$ for some $a \in \mathbb C$. This corresponds to the fact that the action of $\varphi$ on the endpoints $(\pm 1, 0)$ of $S^1$ is trivial.
The ring $R = \{\begin{bmatrix}1 & a\\ a & 1\end{bmatrix}: a \in \mathbb C\}$ is not simple. In fact, there are two simple rings which are quotients of $R$. Thus there are two primitive ideals of $A$ corresponding to each of the points $\pm 1$. Thus those points are bug-eyed (in the same sense as the bug-eyed lined) and $\operatorname{Spec} A$ is not Hausdorff.
