$\ce{H2O}$ molecule is dissociated into $\ce{OH-}$ and $\ce{H+}$ ions on reduction at the cathode in electrolysis. But what happens at the atomic level to $\ce{H2O}$ that proton and hydroxide ions get separated after gaining electrons from cathode? What really happens when water molecule gains electrons from cathode?
$$\ce{2H2O(l) + 2 e- -> H2(g) + 2 OH-(aq)}$$