Topology as a generalization of the open sets of the reals As far as I can make out, topology is a generalization of the properties of open sets of the reals; this is evident in the terminology; for a set $X$, subsets of this space are actually called open if they are a member of the topology on that set. Topology extracts the "main properties" of open sets by requiring that arbitrary unions and finite intersections of open sets are open.
I've also gathered that topology is useful because it creates a setting in which we can do analysis on a space, as it gives us an idea of convergence, continuity of maps etc. What I don't understand is why this is the case. Why do we care about open sets? Is real analysis based around open sets? The definition of the continuity of a function $f:\mathbf{R} \rightarrow \mathbf{R}$ at a point $c\in \mathbf{R}$ is
$\forall \epsilon >0$ $ \exists \delta >0$ such that $\forall x\in (c-\delta , c+\delta)$ we have $f(x)\in (f(c)-\epsilon, f(c)+\epsilon )$,
but we could replace the open sets here with closed sets and have the same definition. In topology a continuous function $f:X\rightarrow Y$ between topological spaces $(X, \tau_X)$, $(Y,\tau_Y)$ is defined to be one such that for any open set $V\in \tau_Y$, its pre-image $f^{-1}(V)$ is open in $\tau_X$. How does this relate to the definition of a continuous function in the setting of real analysis? Thanks for any replies!

You're slightly mistaken about "we could have replaced this with closed sets". In choosing $\epsilon > 0$ and $\delta > 0$, we're essentially covering all open sets around $x$ and $f(x)$, in the sense that every such set contains one of these intervals. The corresponding statement for closed sets would be 
$\forall \epsilon  \ge 0$ $ \exists \delta  \ge 0$ such that $\forall x\in [c-\delta , c+\delta]$ we have $f(x)\in [f(c)-\epsilon, f(c)+\epsilon ]$,
which is true for ANY function: you just pick $\delta = 0$. 
There really is something different about "less than or equal to" and "less than", and this definition of continuity happens to find just that sweet spot where it matters. 
