Guns CAN work in Fantasy, as guns were first introduced around the 1300s to Europe (earlier if we count the Song precedessors), and there was a good chunk of time where most of the tactics of warfare were similar because ballistics would still have to compete with other forms of weaponry and training as they weren't as deadly as they are today. (The Sengoku Jidai saw Samurai fighting muskets, most of the wars in Europe saw a mix of bayonets, Calvary, and musket units until the end of the Naepolenic wars, etc.)
Even still, there's loads of fantasy units that use guns and use the effectively.
The Empire from Warhammer is one of the classics as humanity is much weaker compared to the sheer might of the other factions.
Even still, Dishonored has a mix of the Industrial Revolution/Victorian Era with Fantasy elements to create a new way to intrept fantasy, which uses firearms as well
Kid Icarus: Uprising is my favorite fantasy universe, and it does guns by having traditional melee weapons enchanted with magic so they can shoot effectively. Blades, Staffs, Claws, Bows, Palms, Clubs, Cannons, Orbitars, and Arms all are magically imbuded by the Gods to serve as weapons with projectiles. There's 108 of them, and 107 with ranged attacks
So, yes, guns CAN work in Fantasy, and even High Fantasy. It just depends on how they're implemented.
@crazybars @HDMI1