That categorical definition is for pre-sheaves, the topological definition is for sheaves.
In topological pre-sheaves, a map is surjective if it is epimorphic for each open set $U$ in $X$.
In topological sheaves, however, we instead have to "sheaf-ify" the definition, and we say that the map is "surjective" if the sheaf-ification of the cokernel map is zero.
Basically, in both cases, you have two categories, $\mathcal{Sh}$ and $\mathcal{PSh}$, and in $\mathcal{PSh}$, the "surjective" maps are the ones that are epimorphisms on each $U$, but in the $\mathcal{Sh}$ catageory, you have a more complicated definition of "surjective" (or "epimorphism.")
Consider, instead, two categories, $\mathcal{Ab}$ the category of abelian groups, and $\mathcal{AbTF}$, the full subcategory of "torsion-free" abelian groups - that is, the abelian groups, $A$, where for any $n\in\mathbb Z$ and $a\in A$, $na=0$ iff $n=0$ or $a=0$.
There is the natural inclusion functor $\mathcal{AbTF}\to\mathcal{Ab}$ and a natural adjoint sending $A\to A/N(A)$ where $N(A)$ is the subgroup of nilpotent elements of $A$.
But in $\mathcal{AbTF}$, the "epimorphisms" are not the ones with cokernel (in $\mathcal{Ab}$) $0$, they are the ones with cokerkels which are nilpotent. So, for example, in $\mathcal{Ab}$, the morphism $\mathbb Z\to\mathbb Z$ sending $x\to 2x$ is not an epimorphism, that same map, when considered as a map in $\mathcal{AbTF}$, is an epimorphism.
So consider the "sheafification" functor $\mathcal{PSh}\to \mathcal{Sh}$ to be much like the functor $\mathcal{Ab}\to\mathcal{AbTF}$.
(I believe, but don't quote me, that $f:A\to B$ in $\mathcal{AbTF}$ is an epimorphism if and only if $f\otimes \mathbb Q:A\otimes \mathbb Q\to B\otimes\mathbb Q$ is an epimorphism in $\mathcal{Ab}$.)
This is no trouble: there is a Grothendieck topology on $\mathrm{Top}$ in which the coverings are jointly surjective families of open inclusions, and your notion of sheaf is precisely the same as the notion of sheaf for this covering. There is an issue in talking about the category of presheaves on $\mathrm{Top}$, since the latter is a large category; you can handle this either by restricting the size of your spaces or by allowing presheaves with values in large sets, or, if you really want to consider presheaves on arbitrary spaces valued in small sets, by giving up a few of the nice properties of legitimate Grothendieck toposes.
Best Answer
The three meanings of pullback come together when you think about how to pull back a vector bundle on a space $Y$ along a map $f : X \to Y$. There are three ways to think about this:
Not everything that gets called a pullback is a categorical pullback, though. In general if you have a category of spaces and some assignment $X \mapsto F(X)$ of a category to each space, if you can also define functors $f^{\ast} : F(Y) \to F(X)$ associated to maps $f : X \to Y$ then you'll probably call them pullbacks, and if you can also define functors $f_{\ast} : F(X) \to F(Y)$ associated to maps $f : X \to Y$ then you'll probably call them pushforwards. The categorical pullback occurs when $F(X)$ is some reasonable subcategory of the category of spaces over $X$, but there are other interesting examples.