All of some of the above.
Yes, it was possible to create "Proofed" armour, although this was expensive. Equally there was a lot of "False Proof" armour out there -- dented by hammer, instead of by pistol shot. The problem here is that to keep up against the munitions, the armies would all have to be encased in heavy plate, which is impractical; also, not every part of the body could be equally protected -- proofing was fairly easy for breast/backplates and helmets, but less so for limbs, and then there is the problem of armouring up horses...
Guns, like crossbows, are easier to learn how to handle than selfbows. Like crossbows, they have horribly slow reload time -- early 17th century manuals show to load-and-fire by the book took something like 35 steps with a common matchlock and, at best, you would get off 2 rounds a minute -- this explains the whole pike-and-shot era, the strong (and widely admired) pikemen defend the slow (and widely sneered at) musketeers. And, yes, a peasant with a musket could kill a knight -- hardly considered sporting!
There were other problems with early firearms. Besides the slow rate of reload there was the problem of range -- any decent ranged weapon had a better range and accuracy. If you were really, really good, you could claim accuracy with early firelock weapons out to, maybe, 50 yards. This explains why Benjamin Franklin pushed for raising longbowmen during the American Revolution -- range, accuracy, rate of fire, albeit requiring training from a very, very young age if you were to be any good with them. Next there was the flash and bang. Men, horses, everyone was terrified by this, especially horses. One of the largest parts of training was learning not to flinch. Then there was the smoke. Since the only good way to insure hitting a target was to fire en masse and hope for the best, there was a LOT of smoke, so after 2-3 rounds you could barely see your hand in front of your face.
...and let's not even get started on the artillery...
So why do they take over?
As stated, any peasant can pull a trigger. Equally, unlike arrows, it is easy to make shot for a gun -- heat any softish metal and pour into a mold. You do not have to be raised with the weapon, like a longbow, and the single best offensive force of the era, armoured cavalry, becomes all but useless in the face of a volley -- flash, bang, smoke, smell.
Next there is cost. While a musket might be expensive, it was also heavy, which meant that you couldn't cart around a lot of armour, so the overall equipping of an individual went down. And in the face of other muskets armour in general lost its effectiveness to the point where fewer and fewer men bothered with the armour, so overall the costs of armies fell on an individual basis, thus allowing either cheaper armies or (more often) larger armies.
This also means that you tended to field armies who fought for coin, not for "glory" and family name. That means discipline over tantrums, a major problem with late medieval and renaissance armies. The armies were loyal to the commanders, rather than to vague notions of chivalry.
Finally there are the bullets themselves. Consider early shot. Most of it was lead. Lead, when it hits, splatters. This means that it is difficult to get all of the shot out of the body. Lead left behind in a body is not a good thing, tends to lead to infections rather quickly. Thus casualties can pop up more easily and put people hors de combat rather more readily. More people died from infections from their wounds than from the wounds themselves -- surgical techniques of the period are hardly inspiring to a modern reader.
Are D&D rules for firearms "wimpy"? Sure. But then again, nothing in D&D is even slightly realistic and we shouldn't expect it to be -- that's not what D&D is about. D&D is about fantasy and in fantastical novels people survive bullet wounds at a frightening pace themselves, while gunning down their opponents as if they were firing chainguns instead of single shot pistols.