A bad guy with a gun, standing upright, is still a bad guy with a gun, lying down. Focus on the threat. Kick him in the groin or break his knee to disable HIM but then neutralize the threat.
Guns don't kill people. And in this scenario, people don't kill people. People with guns kill people. Unless that "people" is really, really severely disabled, he's still a bad guy with a gun. Even with OC or mace in his face, or a cold meat pie to the jaw or a kick to the manley bits, and especially with a simple football tackle, he's still got a gun and he's now amped up on adrenaline. And YOU are the object of his sudden pain and rage.
Disable the shooter-gun component.