This is a typical top-down vs. bottom-up construction of a substructure. See the general discussion here.
Let $S\subseteq G$. We let
$$K = \bigcap_{S\subseteq M\leq G}M$$
and
$$H = \Bigl\{s_1^{\epsilon_1}\cdots s_m^{\epsilon_m}\mid m\geq 0,\ s_i\in S,\ \epsilon_i\in\{1,-1\}\Bigr\}.$$
We want to show that $K=H$.
Note that if $M$ is a subgroup of $G$, and $S\subseteq M$, then every element of $H$ must be in $M$, since $M$ is closed under products and inverses and contains every $s_i\in S$. Thus, $H\subseteq K$.
Conversely, to prove $K\subseteq H$, it suffices to show that $H$ is a subgroup of $G$ that contains $S$. To see that $S\subseteq H$, let $s\in S$. Letting $m=1$, $\epsilon_1=1$, and $s_1=s$ we have $s\in H$, so $S\subseteq H$.
To see that $H$ is a subgroup of $G$, note that $H$ is nonempty: selecting $m=0$ we obtain the empty product, which by definition is the identity of $G$. So $1\in H$.
Let $s_1^{\epsilon_1}\cdots s_m^{\epsilon_m}$ and $t_1^{\eta_1}\cdots t_n^{\eta_n}$, with $m,n\geq 0$, $\epsilon_i,\eta_j\in\{0,1\}$, and $s_i,t_j\in S$ be elements of $S$. Then
$$\Bigl( s_1^{\epsilon_1}\cdots s_m^{\epsilon_m}\Bigr)\Bigl(t_1^{\eta_1}\cdots t_n^{\eta_n}\Bigr)^{-1} = r_1^{\chi_1}\cdots r_{n+m}^{\chi_{n+m}}$$
where
$$\begin{align*}
r_i &= \left\{\begin{array}{ll}
s_i &\text{if }1\leq i\leq m\\
t_{n+m-i+1} & \text{if }m\lt i\leq n+m
\end{array}\right.\\
\chi_i &= \left\{\begin{array}{ll}
\epsilon_i &\text{if }1\leq i\leq m\\
-\eta_{n+m-i+1} & \text{if }m\lt i\leq n+m
\end{array}\right.
\end{align*}$$
Note that $r_i\in S$ for each $i$, and $\chi_i\in\{1,-1\}$ for each $i$, so $r_1^{\chi_1}\cdots r_{n+m}^{\chi_{n+m}}$ is an element of $H$. Thus, $H$ is a subgroup of $G$ that contains $S$, and so is one of the subgroups being intersected in the definition of $K$. Hence, $K\subseteq H$.
Since we already had $H\subseteq K$, it follows that $H=K$, as desired.
Best Answer
A different way to phrase the same argument everyone gave:
The map $a\in G\mapsto a^2\in G$ is a group homomorphism and your subset $H$ is its kernel: it is therefore a subgroup of $G$.