The basic idea is the a function $f:X\to Y$ is continuous iff for any open set $V$ containing $f(x)$, there is an open set $O\ni x$ such that $f(O)⊆V$. Thus, given any nbhd (i.e. a degree of closeness) $V$ of $f(x)$ we can take points $O$ "close enough" to $x$ so that all their images are "close enough" to $f(x)$. In metric language, this translates to $f(B(x,δ))⊆B(f(x),ε)$ -- this is the analytic definition you speak of.
Indeed, to say that given any $\varepsilon>0$ there is $\delta >0$ such that whenever $d(x,y)<\delta$ then $d'(f(x),f(y))<\varepsilon$ says precisely that the image of the ball $B(x,\delta)$ is contained in the ball $B(f(x),\varepsilon)$. Since every open set $O$ containing $f(x)$ in a metric space contains a ball $B(f(x),\varepsilon)$, this says that for any open set $O$, $f^{-1}(O)$ is open: take $x\in f^{-1}(O)$, i.e. $x$ such that $f(x)\in O$ and use the above to get $f^{-1}(O)$ contains a ball $B(x,\delta)$.
Conversely, given the open set $B(f(x),\varepsilon)$, saying $f^{-1}(B(f(x),\varepsilon))$ is open means in particular (since $x\in f^{-1}(f(x))$) that there is an open ball $B(x,\delta)$ wholly contained in $f^{-1}(B(f(x),\varepsilon))$. This is equivalent to $f(B(x,δ))⊆B(f(x),ε)$, of course.
The intuitive aid of "closeness", perhaps more appropriate to say metric spaces, might break down when we allow arbitrary topologies. Nevertheless, it is usually an appropriate tool to figure out what's going on.