We study the gap (= “projection norm” = “graph distance”) topology of the space of all (not necessarily bounded) self-adjoint Fredholm operators in a separable Hilbert space by the Cayley transform and direct methods. In particular, we show the surprising result that this space is connected in contrast to the bounded case. Moreover, we present a rigorous definition of spectral flow of a path of such operators (actually alternative but mutually equivalent definitions) and prove the homotopy invariance. As an example, we discuss operator curves on manifolds with boundary.