First let us assume that $Span(M)$ is dense in $H$. We need to show that $M^{\perp} = \{0\}$. So, let $x\in M^{\perp}$ be any arbitrary element. Since $Span(M)$ is dense in $H$ so there exists a sequence $(x_n)$ of elements of $Span(M)$ such that $x_n\longrightarrow x$. Now, by continuity of inner product it follows that $\langle x_n, x\rangle \longrightarrow \langle x,x\rangle$. But each $\langle x_n, x\rangle = 0$, so, $\langle x,x\rangle = \|x\|^2 = 0$ which implies $x=0$. Thus, $M^{\perp}=\{0\}$.
$\textbf{Note:}$ Notice that $x$ was in $M^{\perp}$, so, $\langle x,y\rangle = 0$ for all $y \in M^{\perp}$. But this also implies that $\langle x,z\rangle = 0$ for all $z \in Span(M)$ because any $z \in Span(M)$ is a finite linear combination of elements of $M$ and inner product is linear in first variable and conjugate linear in second variable. This is the reason why $\langle x_n, x\rangle = 0$ for all $n$ above.
Conversely, let us assume that $M^{\perp} = \{0\}$. Then notice that $(Span(M))^{\perp}$ is a closed subspace of $H$. Therefore, by lemma 3.3.4 on page 146 you can write
\begin{equation}
H = (Span(M))^{\perp} \oplus ((Span(M))^{\perp})^{\perp}.
\end{equation}
Since $((Span(M))^{\perp})^{\perp} = \overline{Span(M)}$See this link, it follows that
\begin{equation}
H = (Span(M))^{\perp} \oplus \overline{Span(M)}.
\end{equation}
So, it is enough to show that $(Span(M))^{\perp}= \{0\}$. But this is easy to see and this is also done in the book.