A set is closed if and only if it contains all its limit points.

$S$ is closed iff $S=\overline{S}$. There is a theorem says $x\in\overline{S}\leftrightarrow\forall U(U\mathrm{\ open}\wedge x\in U\rightarrow U\cap S\neq\emptyset)$. We show $\overline{S}=S\cup S'$ ($S'$ denote the derived set). For $``\supseteq"$, note $S\subseteq\overline{S}$ and if $x\in S'$, then every neighborhood of $x$ intersect $S$ in a point different from $x$, so using the previous theorem, $x\in\overline{S}$. For $"\subseteq"$, suppose $x\in\overline{S}\setminus S$, by the previous theorem, every neighborhood of $x$ intersects $S$, but $x\notin S$ implies it must intersect $S$ in a point different from $x$, so $x\in S'$.

So $S$ closed implies $S'\subseteq S$. and if $S'\subseteq S$, we infer $S=\overline{S}$. QED

Reference: Theorem 17.6, 17.7 of Topology by Munkres, James.