It must be set-theoretically equidimensional, but not scheme-theoretically. (Consider two lines in space colliding, developing an embedded point at the intersection.)

For the positive statement, let $d\leq e$ be the smallest and largest dimensions occurring among the components. Slice all fibers with the same general codimension $d$ plane, to get $X'$. Now the special fiber has some isolated points, that were in its $d$-component. If $e>d$, then the general fiber is still irreducible by Bertini, so connected. But Zariski's Main Theorem prevents you from degenerating connected to disconnected.

There should be a classical reference, I presume, but I don't know one, and just put this argument in proposition 2 of this paper on degenerations.

(Also, you probably don't mean "each generic fiber" -- the generic fiber is the fiber over $Y$'s (only) generic point. I'm guessing you mean "each general fiber". To see the confusion available here, consider the squaring map $\mathbb A^1 \to \mathbb A^1$, whose general fibers have two points but whose generic fiber is irreducible.)