This is actually true for countably infinite product of separable spaces with the suitable product metric defined by it. Explicitly if the metrics on $X_{i}$ are $d_{i}$ , then (one such) product metric(a metric which induces the product topology) is given by $\displaystyle d(x,y)=\sum_{i=1}^{\infty}\frac{1}{2^{i}}\frac{d_{i}(x,y)}{1+d_{i}(x,y)}$
Note that for the finite case, the euclidean metric is itself is enough to induce the product topology .
If you are comfortable with topology, then it is best to consider a topological proof.
Some notation:- I prefer the "tensor" notation for the product $\sigma$-algebra as it distinguishes from the mere cartesian product of the sigma algebras(which by the way is not a $\sigma$-algebra) . So the product sigma algebra will be denoted by $\displaystyle\otimes_{i=1}^{n}\mathcal{B}(X_{i})$ . Note that it is just a notation(a standard one) and there is by no means any "tensor product" involved here.
Since all the spaces are separable, prove that the product space is also separable.
By definition of the product topology, you have sets of the form $\prod_{i=1}^{n} U_{i}$ where $U_{i}$'s are open in $X_{i}$ form a basis for the product topology. Now each $X$ has a countable basis of open balls . So prove that the product of these balls form a basis for the product topology. Explicitly , consider dense subsets $\{x_{n}^{i}\}_{n=1}^{\infty}$ for each $i$ . Then $\mathcal{C}=\{\prod_{i=1}^{n}B_{i}\,\,:\, B_{i}=B_{d_{i}}(x_{k}^{i},r_{m})\,,r_{m}\in\Bbb{Q}\,,m,k\in\Bbb{N}\}$ is a countable basis for the product topology. Now prove that the metric topology induced by $d$ is equivalent to the product topology (This is a standard excercise in any real analysis text if you don't know it already).
Now this means that any open set in the metric topology $U$ can be written as a countable union of sets in $\mathcal{C}$. But all the sets in $\mathcal{C}$ are in $\otimes_{i=1}^{n}\mathcal{B}(X_{i})$ . . Hence their countable union $U$ is in $ \otimes_{i=1}^{n}\mathcal{B}(X_{i})$. This holds for any open set $U$ in the product metric topology. This means that $\mathcal{B}(X)\subset \otimes_{i=1}^{n}\mathcal{B}(X_{i})$ .
Conversely consider $\mathcal{F}_{n}=\{E\in\mathcal{B}(X_{n})\,: \Pi_{n}^{-1}(E)\in \mathcal{B}(X)\}$ where $\Pi_{n}$ denotes the projection map. Now by definition all open sets in $X_{n}$ are contained in $\mathcal{F}_{n}$. Prove that $\mathcal{F}_{n}$ is a sigma algebra and conclude that $\mathcal{F}_{n}=\mathcal{B}(X_{n})$ . This holds for all $n$.
Thus $\otimes_{i=1}^{n}\mathcal{B}(X_{i})\subset \mathcal{B}(X)$ .
So we have equality.
In general $\otimes_{i=1}^{n}\mathcal{B}(X_{i})\subset \mathcal{B}(X)$ this is always true irrespective of whether the metric spaces are separable or not. But the other inclusion might fail without separability.