General topology has its roots in real and complex analysis, which made important uses of the interrelated concepts of open set, of closed set, and of a limit point of a set. This article examines how those three concepts emerged and evolved during the late 19th and early 20th centuries, thanks especially to Weierstrass, Cantor, and Lebesgue. Particular attention is paid to the different forms of the Bolzano–Weierstrass Theorem found in the latter's unpublished lectures. An abortive early, unpublished introduction of open sets by Dedekind is examined, as well as how Peano and Jordan almost introduced that concept. At the same time we study the interplay of those three concepts (together with those of the closure of a set and of the derived set of a set) in the struggle to determine the ultimate foundations on which general topology was built, during the first half of the 20th century.