The numbers given in pixels or megapixels tell us the number of pixels (or, sensors) that the hardware can process.
A photo frame is a matrix of data grabbed from sensors. A 5MP photo contains nearly 5 millions of pixels that are processed and saved by the hardware. As you know, it is done in a single shot and the duration of a single shot is a few milliseconds.
Since a video can be thought of as a series collection of photo frames, the hardware may not be fast as it was on processing photo frames. I mean, it may not be able to process those 5MP frames in 60 (or even 25) times per second (Yup, the frame rate). In other words, if a camera can record maximum 1920x1080 (i.e. 2MP) video at 60FPS, then the hardware is capable of processing 1920x1080x60=124.4 millions of pixels in only one second. So, that is the limit.
To your last question: I have no idea about if there is a direct relation between those two. But, as I explained above, the limitation comes from the hardware itself.