I attempted to prove this theorem by contrapositive. Suppose $\overline{S}$ is disconnected. Then $\overline{S}=A\cup B$ such that $\overline{A}\cap B=A\cap \overline{B}=\varnothing$ and $A$ and $B$ are both nonempty. It follows that since $S\subseteq \overline{S}$, $S\subseteq A\cup B$. If $S$ is closed then the theorem follows trivially, so we will consider $S$ not closed. If $S\subset A\cup B$, then $S\subset A$, $S\subset B$, or $S$ contains some elements from $A$ and some from $B$. Suppose $S\subset A$, then $\overline{S}\subset \overline{A}$, and therefore there must be a $p\in\overline{S}$ that is also in $\overline{A}$ and $B$ since $B$ is nonempty and $\overline{S}=A\cup B$. But this contradicts $\overline{A}\cap B=\varnothing$. The same arguments holds for $S\subset B$.
Therefore it must be the case that $S$ contains elements of $A$ and $B$. Define the following sets,
$C=\{p : p\in S\cap A\}$
$D=\{q :q\in S\cap B\}$.
Then $S=C\cup D$. Consier $\overline{C}\cap D$. If $p\in \overline{C}\cap D$, then $p\in \overline{A}\cap B$. Another contradiction. The same argument holds for $C\cap \overline{D}$. Therefore $S=C\cup D$ with $\overline{C}\cap D=C\cap \overline{D}=\varnothing$. Thus, by contrapositive, if $S$ is connected then $\overline{S}$ is connected.