From a purely historical point of view, guns are completely imbalanced. They combine very long range, high stopping power, and in many cases a ridiculously high rate of fire. Compared to even the crossbow, the armor-piercing power of firearms destroys the viability of most other battlefield armaments and changes the way people think about combat.
Melee weapons are only viable inside the close distance that a firearm wielder can be attacked before he can ready his weapon and fire. Even inside that distance, if the gun is already readied, no close combat weapon is viable. Guns are just so deadly that they obsolete melee weapons at any distance except melee distance, and even at that range, many firearms are viable weapons. A handgun can be maneuvered at close range even if the enemy has a knife, and the firearm wielder can retreat backwards to evade a swing and is deadly at any distance.
But in fiction and fantasy this doesn't have to be the case. Many of our fictional worlds have relatively high technology levels. We like to think of our worlds as Renaissance-level in terms of cultural advancement, or perhaps we have a magi-steampunk setting similar to Eberron. Even in a setting with tech comparable to feudal Japan, guns can fit right in. They can even be OK in this kind of environment, because in our fantasy settings, we don't have the same rules as IRL.
In real life, a high caliber rifle bullet can get through steel plate armor but it's not actually a guarantee. Plate armor is actually reasonably OK at deflecting bullets. It's heavier than modern body armor, but we use steel plates in our body armor even today (though we are phasing them out for composite plates that are lighter). Against a modern handgun bullet, it should do alright. Against a lower-velocity black powder round like a musket ball or even a "modern" black powder cartridge like a 30-30, it should work just fine. It might not be as effective at stopping a bullet as it would be at stopping an arrow, but we generally don't make any differences in the armor penetrating capabilities of a rapier versus a falchion even though the difference in that case is enormous.
Even if there is a bit of a discrepancy we can easily grant magic armor or spells "equal" protection against all kinds of weapons. Fantasy is great like that.
In game mechanics terms, there really isn't that much difference between a semi-automatic rifle and a bow. It generally takes 1 action to fire a bow, and 1 action to fire a semi-automatic gun. This is somewhat unrealistic IRL; accurate aimed fire from a bow might get you 10 or so shots per minute for a skilled archer, while a skilled revolver shooter can (with moon clip or speed loader) easily fire 12 shots accurately from a single-action revolver in a minute, with a reload in the middle. A skilled handgun shooter can accurately shoot a full 18 rounds out of a Glock magazine in 1 minute. This is not a special skill held by the fastest handgun shooters. Those people can probably empty 3 Glock magazines accurately into targets with reloads in a minute. Guns are a lot faster IRL than bows. Fortunately, a single shot is a single action. It's possible a bow takes an extra partial action to draw the arrow or something, but many systems don't require this.
Single action revolvers are probably the highest-end of the technological spectrum that we would ever expect in a fantasy setting, and if we compare them to a hand crossbow, they're not that much different. A single-action revolver technically doesn't require both hands to ready for a second shot, but it's easy enough to say that the "cocking" takes both hands to do quickly. Similarly, a hand crossbow only requires you to draw a round of ammunition (generally a free action), cock the crossbow (a light pull), and the crossbow is ready for firing. In real life terms drawing the ammo is definitely slower, but the cocking is roughly the same speed and in many game systems drawing the ammo is "free" in terms of action speed. The revolver has to take an action every so often to reload the shots, too. It's definitely not superior in a game mechanics environment.
Everything else is a long gun (can be balanced around a longbow), is crew-served (not appropriate for players), or is single-shot, and thus not that significant compared to throwing weapons.
What about long guns? Well, readying a bolt action rifle to fire is a comparable amount of effort compared to a bow, and a bolt action rifle is really advanced compared to the time periods we're talking about. The first bolt action rifles came about in the late 1800s and early 1900s. The Renaissance ended long before that. Most guns in those days took minutes to reload. An extremely skilled musketeer might be able to reload as quickly as 15 seconds. Go watch a YouTube video of someone reloading a black powder gun. It typically takes 15 seconds just to measure the powder in the main charge and put it in the barrel for even someone with a lot of training and practice.
Lever and pump action guns came before that but we're still looking at the 1800s. Technically revolvers did too, but that's fine. Either way, a lever or pump action gun should be roughly the same as a longbow.
This post is super late -- so late it's tomorrow's post. Blame Top Shot marathons, lol.