I've caused this problem several times on my laptop.
Once it was because I plugged the keyboard into the mouse port. Sadly, I am 100% serious when saying this.
Disabling GPM could work, too, but you won't have mouse support in your console then. At least you'll be able to login though, and correct your settings (check the mouse device / protocol used by GPM)
If you have a second computer available, now is the time to use that SSH connection
(sorry for being rather vague, but I'm not near any linux computer at the moment)