How good this is depends on the available choices for firearms
Gunner minus the ability score increase as a fighting style gives you
- You gain proficiency with firearms (see "Firearms" in the Dungeon Master's Guide).
- You ignore the loading property of firearms.
- Being within 5 feet of a hostile creature doesn't
impose disadvantage on your ranged attack rolls.
For rifles, the first two bullets put you on par with what you get when you take a longbow: proficiency and no loading limitation.
With handguns, you can use your other hand for a second weapon, or to hold a shield, worth the equivalent of +2 AC. You'd initially pick this "Gunslinger" fighting style instead of picking Archery, which would give you +2 to attack rolls with ranged weapons instead.
If both weapons are dealing comparable damage, that means you are effectively winning 2 AC and the ability to attack from within 5 feet without disadvantage for giving up +2 to hit and a longer range. This makes you better in melee, for being worse in longer range combat. Overall this would seem relatively balanced.
However, how good this really is will depend strongly on the available weapon choices. To compare, here are a few options:
Weapon |
Range |
Damage |
Properties |
Period |
Longbow |
150/600 |
1d8 piercing |
Ammunition, heavy, two-handed |
Medieval |
Pistol |
30/90 |
1d10 piercing |
Ammunition, loading |
Renaissance |
Musket |
40/120 |
1d12 piercing |
Ammunition, loading, two-handed |
Renaissance |
Revolver |
40/120 |
2d8 piercing |
Ammunition, reload (6 shots) |
Modern |
Laser Pistol |
100/300 |
3d6 radiant |
Ammunition, reload (50 shots) |
Futuristic |
Antimatter Rifle |
120/360 |
6d8 necrotic |
Ammunition, reload (2 shots), two-handed |
Futuristic |
For Renaissance weapons like the pistol, it seems slightly better than Archery + Longbow. You deal an expected one point of extra damage (d10 instead of d8), on top of the deal above, which at least at lower levels may be worth about as much as +1 of the +2 to hit from Archery, or half a fighting style.
For all of the modern or futuristic weapons, the fighting style would be clearly unbalanced.1 Here, gaining proficiency with these killer weapons is what really makes the fighting style tick. The other stuff is just gravy.
For example, with a Revolver you would be dealing 2d8 damage, or an extra 4.5 more damage each attack, doubling your damage output. There is no comparable fighting style that would add that amount of extra damage, never mind putting this on top of other advantages like better AC.
If you had access to a Laser Pistol, you would be dealing an expected 6 extra damage with each attack, more than doubling your damage output with each attack, and using a better damage type. This would be entirely broken at low levels.
Now, what weapons are available is of course up to the DM. But in a game world with access to such weapons, getting to be proficient with them would be extremely strong, and would make this fighting style an automatic pick over other ranged fighting styles.
I don't think there is a good way to balance this, because the weapon choices are so unbalanced. Even if you strip away free loading and close combat benefits, just plain proficiency with something like an antimatter rifle is going to be bonkers. And if you take away proficiency instead, Rennaissance weapons would be disgustingly bad.
1 Dropping loading does not matter with modern weapons, as they work with reload instead. But with a typical fight just going about 4 rounds, reload effectively means there is no need to load at all (or maybe once with a bonus action, if you have extra attacks and a revolver).