They both have their uses and whichever one you use more you will be better with. The fact that people adapt makes comparing the two tricky, I think the best way to compare the two would be to test people who had no experience with either.
My own subjective experience is that people can make almost any game work on the keyboard to a degree, I played through Resident Evil 4 on PC before they rereleased it so I literally aimed with the arrow keys and it was awful at first, eventually I was able to beat the game on normal without much hassle. Had I been able to use a mouse, I could have probably beat harder modes of the game but I think people can in general make keyboard work for almost any game, even ones that highly recommend gamepads.
I do think that there are limitations to both KBM and gamepad that cannot be overcome no matter how much practice. On the KBM side, mouse control of FPS games is more precise than gamepad, joysticks only move so far and mouses can be moved much further, for instance at my sensitivity, if I slide my mouse from 1 side of my mousepad to the other, I spin 3 times in most FPS games, and it takes less than a second. Setting sensitivity to replicate that on a gamepad would make precision aiming much less accurate. Other KBM advantages are mouse usage for RTS games and the additional bindable keys available on keyboards, although more handy than advantageous.
Gamepads on the other hand offer better control of movement because most KBM games use keys to move, and keys are binary, on or off, unlike joysticks which can be tilted slightly for slower movements or better turns. I personally can beat most games fine with keyboard, even racing games, but it took a long time to learn how to tap keys correctly to perform tighter turns. Gamepads are also nice because they are more mobile, keyboards and mice need flat surfaces for precise movements, gamepads do not.
Basically, anyone who says "KBM or Gamepads are better" is wrong because each one has their own merits. A more specific statement could be seen as correct but its all very subjective. If I only played racing games, gamepads would be better than KBM, but that would only be true for me and not anyone else.