The gym boss is impossible to kill. reloading is too slow, even when invulnerable briefly.
Gym boss is very straightforward, as long as you save up ammo beforehand (IE: Don't just spam the pistol before the boss battle. Make sure you use it as little as possible beforehand).
Give yourself spacing. You'll want to close with the boss as soon as the fight starts, but only enough to see him (and therefore be able to shoot him). Go for head (or dick) shots in the first phase, back up a fair amount, you can aim and get 2-3 shots off before he catches up, rinse and repeat. For reloads, move back even further and reload, then keep shooting. When you get fairly close to the wall, but not right up next to it, bait out his attack and quickly cross past him. Rinse and repeat until he falls over and exposes his head. Then unload into his exposed cranium until he stands up and summons his help by slamming the floor and causing two zombies (one male, one female) to drop from the sky, along with 2 mags of ammo and a health pack.
This second phase, he covers his head and will keep covering it until you stagger him and get to unload on it again. The two mob enemies will only attack if they notice you (if you get close) so you can deal with them separately. If you're ballsy and a bit lucky, you can melee them to death by baiting the boss attacks and drawing them away (they have similar walk speeds) so you can hit them without risking the boss hitting you. Repeat the earlier stage, knock him down and shoot him in the head.
Someone else has said you can hit the head while he's attacking but I never tried that tbh. Just repeated dick-shots until he goes down, then nail the weak spot until he stands up again. I find that as long as I use very little ammo before the fight and aim well during it, there'll be enough ammo for it and some to spare by the end.
To bait out his attacks, you need to stand still and wait for him to raise his arms, then run back quickly (to simply bait it) and delay him. To get past him without taking a hit, you need to do the same, but only dodge back a little bit, then run past him as soon as he hits the ground. 9 times out of 10, he goes for another swing, which lands once you're already past him.
Do that and boss is GG EZ