Reason of dissociation of water molecule in electrolysis
The dissociation of water to $\ce{OH-}$ and $\ce{H+}$ happens first before any interaction with the cathode. $\ce{H+}$ ions then gain an electron at the cathode to produce hydrogen. At the anode, water is oxidized (loses electrons) to produce oxygen and more $\ce{H+}$ ions.

In pure water there is a very small concentration of $\ce{H+}$ and $\ce{OH-}$ which is why the reaction is very slow and not thermodynamically favorable. It is also the reason why pure water is such a good insulator. But when you add an electrolyte the process becomes much more favourable kinetically and thermodynamically. Further proof that $\ce{H+}$ and $\ce{OH-}$ are generated before any interaction with the cathode.