It could work easily enough. D&D traditional fantasy already interweaves supernatural ability into the swords and shields part of combat, so it wouldn't be beyond reason that, say, a fully knight man with tower shield and longsword could take on a leather clothing, six-shooter cowboy. I mean, if a halfling rogue is somehow conceivably capable of damaging ogres with his 1d4 dagger because of sneak attack damage.... then anything is possible in my opinion.
The tech level obviously would have to be restricted so that it isn't too widespread. Samurai still existed in one form or another when firearms were first introduced to Japan, but they "died out" eventually because firearms finally became mainstream or widespread. Of course... the samurai didn't have supernatural fighting abilities of the level D&D gives the typical character.
So you could even go so far as to say that guns are everywhere, yet the art of the mundane weapon still thrives in one form or another.
I'd say, if anything, probably the only thing in a supernatural world that would probably die down is the armor itself, considering that it is totally ineffective against bullets.
If you were to introduce firearms into the campaign as more than just a gnomish novelty, might want to look into other variant rules. Like the UA class AC bonus, and stuff. That way characters could conceivably ditch the really heavy armor types, and perhaps fit a more modern world that is transitioning.
Perhaps even introduce throughout the game different types of weaponry, like shields and such that are designed specifically to counter the firearms, just to add a bizarre twist or conflict between the new technology and the old desperately attempting to adapt and regain its supremacy in the field of arms.