$I$ is a finite set. It is not hard to see that, if $X=\prod_{i\in I}Y_i$ is separable, then $Y_i$ does not have to be separable.
But for this special case such that $Y_i=Y_j \ \forall i,j\in I$, I cannot find a counter-example. Could you please help me with it?
$Y = \pi[X]$ where $\pi$ is a continuous projection. This is a continuous open surjection. These preserve separability and connectedness. So if $X$ has those properties so has $Y$. The number of factors is irrelevant.