Direct construction of the Stone-Čech compactification using ultrafilters? If $X$ is a set (regarded as a discrete space), its Stone-Čech compactification can be identified with the set of ultrafilters on $X$ with its natural (Stone) topology.  If $X$ is a general topological space, given any continuous function $f : X \to C$ from $X$ to a compact Hausdorff space $C$, we can push forward ultrafilters on $X$ to ultrafilters on $C$, which must have unique limits.  So define an equivalence relation on ultrafilters as follows: $F \sim F'$ if their pushforwards under all continuous functions from $X$ to some compact Hausdorff space $C$ have the same limits.  Then it seems to me that the set of equivalence classes of ultrafilters on $X$ under $\sim$, with an appropriate topology (perhaps the quotient topology from the space of ultrafilters on $X$?), ought to be the Stone-Čech compactification of $X$ in general.
So does this construction actually work, and if so, is there a simpler definition of the equivalence relation $\sim$?  
Edit: also, if this construction works, is it explicitly written down anywhere in the literature?  The references I found seem to work with a different notion of ultrafilter (ultrafilters of zero sets or something like that), and I'm wondering whether (or why) this is necessary.
Edit #2:  Okay, so as it stands, the problem that I see with the definition of $\sim$ is that I am attempting to quantify over the class of compact Hausdorff spaces.  How do I fix this?
 A: To elaborate Andreas Thom's comment into an answer:
Yes, this construction works, proof below. Also, you seemed unhappy about the equivalence relation involving universal quantification over possible compact images. Fortunately, it is possible to describe it solely in terms of the topology on $X$.
A note on the space of ultrafilters.
Let $X$ be a topological space and let $pX$ denote its space of ultrafilters, i.e. the Stone-Čech compactification of $X$ with the discrete topology. For any (not necessarily continuous!) map $f : X \to Y$ to a compact space $Y$, there exists a unique continuous map $\tilde f : pX \to Y$, which is given by
$$ \tilde f(p) = \lim_{x \to p} f(x) .$$
Equivalence relation on ultrafilters.
We want two ultrafilters $p,p'\in pX$ to be equivalent if they cannot be distinguished by continuous functions into compact spaces, i.e.
$$ p \approx p'  \iff  \lim_{x \to p}\ g(x) = \lim_{x \to p'}\ g(x) \quad\text{for all continuous } g:X\to C .$$
This definition is somewhat unsatisfactory, since it doesn't refer to the topology of $X$ directly. Fortunately, we can use the following equivalence relation instead: two ultrafilters are considered equivalent if they cannot be "separated" by closed sets
$$ p \sim p' \iff  (A \in p \wedge A'\in p' \Longrightarrow A\cap A' \in p \wedge A'\cap A \in p') \text{ for all closed sets } A,A'\subseteq X .$$
This relation might identify fewer ultrafilters than the old one, but we still have that $p \not\approx p'$ implies $p \not\sim p'$. After all, if two ultrafilters $p$ and $p'$ have different limits in some compact image $C$, then we can separate the points $g(p)$ and $g(p')$ by disjoint closed sets, for instance by using Uryson's lemma on the quasicompact Hausdorff space $C$. Pulling back these closed sets shows that $p \not\sim p'$.
$\beta X$ as quotient
We denote the quotient space with $\beta X := pX / \sim$. It's easy to see that it has the universal property, after all, every map $g:X \to C$ lifts to a unique, continuous map $\tilde g : pX \to C$, but since $g$ is continuous, its lifting also factors through the quotient $\beta X$.
To finish the proof that $\beta X$ is the universal compactification, we have to show that $\beta X$ is compact and that the natural map $\iota : X \to \beta X$ is continuous.
$\beta X$ is quasicompact and Hausdorff
As a quotient of a compact space, the space $\beta X$ is quasicompact.
By definition, any two ultrafilters $p \not\sim p'$ can be distinguished by a continuous function $\tilde g : pX \to C$ into a compact space $C$. But $C$ is Hausdorff and we can pull back open neighborhoods from $C$.
The natural map is continuous
This is the hardest part, but it's not too bad. We show that preimages of closed sets are closed.
Let $B\subseteq \beta X$ be a closed set and $A = \iota^{-1}(B)$ be its preimage. Let $\bar A \subseteq X$ be the closure in $X$ and let $y\in \bar A \setminus A$ be a point on the boundary. We have to show that its image $\iota(y)$ is already a member of $B$.
We construct two ultrafilters $p_y$ and $q_y$ as follows:
$p_y := $ the principal ultrafilter on $y$.
$q_y := $ some ultrafilter that contains all open neighborhoods of $y$ and the set $A$. This is possible because the point $y$ is from the boundary of $A$, which means that all open neighborhoods of $y$ have nonempty intersection with the set $A$. (Use Zorn's lemma to upgrade the filter generated by these sets to an ultrafilter.)
The key point is that the ultrafilters $p_y$ and $q_y$ converge to the same point $y$ and thus cannot be distinguished by continuous functions from $X$ to some other space, i.e. $p_y \approx q_y$. Alternatively, all closed sets in $q_y$ must contain the point $y$ and we also have $p_y \sim q_y$.
Hence, both ultrafilters are equal in the quotient $\beta X$,
$$ \iota(y) = [p_y] = [q_y] .$$
Using the note above and applying it to $\iota$, we can write this as
$$ \iota(y) = \lim_{x \to p_y} \iota (x) = \lim_{x \to q_y} \iota (x) .$$
But the latter limit must be a member of the set $B$! Otherwise, by the definition of the limit along an ultrafilter, the preimage $A^c =\iota^{-1}(B^c)$ of the open complement $B^c$ would be a member of the ultrafilter $q_y$, which contradicts $A\in q_y$.
A: This is actually somewhat complicated in general, and requires some hypotheses on the space $X$.  Namely,  $X$ must be completely regular, so if your construction does not use this hypothesis it will not in general give the Stone-Cech compactification.  See section 1.34 onward of Russel C. Walker's book "The Stone-Cech Compactification."  I believe the ultrafilter construction is initially due to Waldhausen, but Walker's exposition is very readable and I can't find the Waldhausen paper.
The upshot is that in general one wants to consider ultrafilters of zero sets of $X$, rather than ultrafilters of closed sets in general.  This is necessary because the closed sets of a non-normal space don't behave nicely--in particular, they aren't separated from one another by continuous real-valued functions.  But if you look at the universal property of the Stone-Cech compactification, this is exactly the relevant type of separation, so one needs to look at zero sets instead.
EDIT:  In response to Qiaochu's comment, I'm going to make some fuzzy remarks on how much of the topology of a topological space $X$ the category Top sees, as opposed to how much of the topology of $X$ the category of compact Hausdorff spaces sees (call this KHaus).  I won't be as formal as possible because I think doing so would risk obfuscating some subtle points--but to point in the direction of a formalization, note that there is a functor $F: Top\to [Top, Sets]$ (where $[-,-]$ denotes the functor category), and a functor $G: Top\to [KHaus, Sets]$ where both functors are given by $X\mapsto \operatorname{Hom}(X, -)$.  The question I want to address is---how much of the topology on $X$ can we recover from the functors $F(X), G(X)$?
Now for the first question, Top sees everything about a topological space $X$.  This is obvious from the Yoneda lemma, but more explicitly, one can consider the two-point space $A=\{x, y\}$, where the open sets are $\emptyset, \{x\}, \{x, y\}$.  Then $\operatorname{Hom}(X, A)$ gives exactly the open/closed sets of $X$, and one can even extract the (closed) sets themselves by taking the pullback of diagrams of the form $X\to A\\leftarrow \{y\}$.
But note that the space $A$ is not contained in KHaus, since $x$ is not a closed point.  One should think of KHaus as only seeing "zero sets," or more generally level sets, of functions on $X$.  Indeed, given any function $f: X\to Y$ in KHaus, one may extract the level set $f^{-1}(y)$ by taking the pullback of $X\to Y\leftarrow y$ (which may not exist in KHaus, but one can see the functor it represents).  On the other hand, if $S$ is a closed subset of $X$ which is not the level set of any function, how do we see it?  For example, $\operatorname{Hom}(A, Y)=\operatorname{Hom}(pt, Y)$ for any compact Hausdorff space $Y$---KHaus does not distinguish these two spaces.
The upshot is that KHaus only "sees" zero sets (or more generally, level sets of functions), so any natural functor defined out of KHaus will be built from them, rather than arbitrary closed sets.
EDIT 2:  This is an attempt to address Qiaochu's Edit #2.  I claim that it suffices to quantify over spaces of cardinality at most that of $X^{\mathbb{N}}$.  Indeed, let $C$ be any compact Hausdorff space, and $f: X\to C$ a function.  Then it factors through $\overline{f(X)}$ which is closed in $C$ and thus compact Hausdorff, and has cardinality at most $X^\mathbb{N}$.  So it suffices to quantify over compact Hausdorff spaces of bounded cardinality.
To see the claim about the cardinality of $\overline{f(X)}$, note that $f(X)$ has cardinality at most that of $X$, and there is a surjective map from convergent sequences in $f(X)$ to $\overline{f(X)}$ (namely taking the limit).  But convergent sequences in $f(X)$ are a subset of $f(X)^{\mathbb{N}}$.
Now the class of isomorphism classes of compact Hausdorff spaces of bounded cardinality (or indeed, of topological spaces of bounded cardinality) is clearly a set, which lets the quantification go through.
EDIT 3:  Qiaochu points out that I assumed the existence of a locally countable base in the last edit---we can't say that every point is the limit of a sequence; instead one needs to say it's the limit of an ultrafilter.  This gives a larger bound on cardinality, but still a bound.
