First, insurers would not insure crazy people. So instead of relying on the non-functional patchwork of state and local reporting/nonreporting of mentally ill people into various non-coherent databases, private industry would figure out how to weed out crazy people PDQ. That would probably mean everyone would have to go through some screening by the insurer to buy a gun. This would (a) slow down gun purchases; (b) reduce crazy people buying guns (like Aurora and VT shooters); and (c) result in the creation of a nationwide database of people who insurance companies have deemed uninsurable, valuable in and of itself. All this would be done by the magical invisible hand of the insurance market.
Second, insurers would pour tons of money into gun research to figure out patterns of gun/ammo purchasing behavior that lead to mass shootings. People stockpiling guns and ammo would get flagged. Their rates would go up until they couldn't afford the behavior anymore. They might even get reported to the police, if the law requiring gun insurance also instructed insurers to do so.
Third, insurers would get pretty tired pretty quick of paying out big judgments when little kids find an unsecured gun and kill themselves by accident. They would start requiring their insureds to have safes and trigger locks, and start making them take safety classes, to get a reasonable rate. all stuff that Scalia would probably find unconstitutional if the government directly ordered it, but through insurance we've made it a matter of private contract. Don't want to buy a gun safe? Fine. Pay $10,000 a year in gun insurance for your snub nose .38. It's a free country. If you promise your insurer to use a gun safe, and when you don't a kid gets killed, the insurer pays out and then bankrupts you to make up some of the loss.
Fourth, insurers would quickly figure out what kinds of guns cause the most deaths. Insurance on those guns would go up. Probably revolvers and other handguns, while rifles and shotguns (even AR-15s) might remain affordable. This will reduce sales and ownership of those guns over time, making our society less gun saturated.
Is gun insurance a panacea? No, it certainly is not. You have to allow people to cancel the insurance if the gun is stolen, and criminals won't carry the insurance. But points 1, 3, and 4 would, over time, result in less guns being available for criminals to steal.
You can argue that the insurance penalizes law abiding people. But we penalize people all the time for doing legal things, or restrict the manner in which they do them, because their legal activity creates risks and costs (externalities) that society shouldn't have to bear. Car insurance is the most obvious example, but alcohol and cigarette taxes also fall into this category. So do motorcycle helmet laws and seatbelt laws. So do fees levied by towns when a developer builds a new road that the town will have to maintain.