This is a special case of Hewitt-Marczewski-Pondiczery theorem, see e.g. Theorem 2.3.15 in Engelking's General Topology:
If $d(X_s)\leq \alpha\geq\aleph_0$ for every $s\in S$ and $|S|\leq 2^\alpha$, then $d(\prod X_s)\leq\alpha$.
The $d(X)$ denotes the density of the topological space $X$,
which is defined as $$d(X)=\min\{|D|; D\text{ is a dense subset of }X\}+\aleph_0.$$
I.e., $d(X)$ is the cardinality of a smallest dense subset, but if there is a finite dense subset, we put $d(X)=\aleph_0$.
This means that a topological space is separable if and only if $d(X)=\aleph_0$.
Some further references are given at Planetmath. Wikipedia article on separable space mentions Theorem 16.4c in Willard's General Topology as a reference for the special case you're asking about.
A proof of this theorem can be found at in this post from Ask a Topologist. (Wayback Machine; The post was written by Henno Brandsma.)
This theorem can be used to show that there is an independent family on $\mathbb N$ of cadinality $\mathfrak c$; see
Stephan Geschke's MO post
and paper.