First off, just for the sake of clarity, the relevant definitions:
A topological space is said to be separable if it contains a countable dense subset. In other words, $X$ is separable if there exists a countable subset $\{x_n\}$ such that if $U \subseteq X$ is open and nonempty, then $U \cap \{x_n\} \ne \emptyset$.
The theorem, then, is that a Hilbert space $\mathscr{H}$ is separable if and only if there is some countable set $\{e_n\}\subseteq \mathscr{H}$ such that $\mathscr{H} = \overline{\operatorname{span}(\{e_n\})}$. Again, for clarity, note that the span of a set is the collection of all finite linear combinations of elements of that set, and by taking the closure, we get infinite linear combinations. This is equivalent to the statement that there is some subset of $\mathscr{H}$ which has a dense span in $\mathscr{H}$ (i.e. your original statement). In other words,
$$ \mathscr{H} = \overline{\operatorname{span}(\{e_n\})} = \overline{\left\{ \sum_{j=1}^{\infty} \lambda_j e_j \ \middle|\ \lambda_j \in \mathbb{F}, e_j\in\{e_n\} \right\}}, $$
where $\mathbb{F}$ is the base field (we will assume that $\mathbb{F} = \mathbb{R}$—we'll use the fact that the base field is separable, and other fields (such as $\mathbb{C}$) can get the job done, but the generalization is not too hard to come by, so we'll stick with the assumption that $\mathscr{H}$ is a real Hilbert space).
For the forward implication, suppose that $\mathscr{H} = \overline{\operatorname{span}(\{e_n\})}$, where $\{e_n\}$ is countable. Since $\operatorname{span}(\{e_n\})$ is dense in $\mathscr{H}$ and $\mathbb{Q}$ is dense in $\mathbb{R}$, it follows that
$$ \left\{ \sum_{j=1}^{k} q_j e_k \ \middle|\ q_j \in \mathbb{Q}, e_j\in \{x_n\}, k \in\mathbb{N} \right\} $$
is a countable dense subset of $\mathscr{H}$ (this statement requires some proof, but is certainly doable—I'll leave it as an exercise). Hence $\mathscr{H}$ is separable.
For the reverse implication, suppose that $\mathscr{H}$ is separable. Then there exists a countable set $\{x_n\}\subseteq\mathscr{H}$ that is dense in $\mathscr{H}$. But
$$ \{x_n\} \subseteq \operatorname{span}(\{x_n\}), $$
and so it follows from the density of $\{x_n\}$ that $\operatorname{span}(\{x_n\})$ is also dense in $\mathscr{H}$, which completes the argument. Or, if you prefer, we could apply the Gram-Schmidt procedure to $\{x_n\}$ in order to obtain an orthonormal set with dense span.