I think it's a difficult question because "guns" are a moving target along two or so dimensions. The obvious is rate of fire with an efficacy twist:
Muzzle loaded smooth-bore (short range, relatively fast to load).
Muzzle loaded rifle (long range, slow to load)
Then the muzzle loaded rifled musket, which used the Minié ball to achieve both, and great carnage in the Crimean War and our Civil War.
Now the developments are rapid:
Breach loaded single shot rifles.
Repeaters with relatively slow loading, with a move to smokeless powder.
Clip fed repeaters, a critical Mauser innovation. With the 1898 model, the battle rifle is fully "modern". With of course effective semi-auto models to follow, plus the lower powered/lower range assault rifle (and I can't help but notice that the short ranged AK-47 is something a dictator would prefer to be issued, vs. something more able to reach out and touch him).
But ammo, going back to the rifled musket, we're using corrosive primers, and black power residue attracts moisture. That is, it takes a fair amount of diligent effort to keep a rifle from rusting out.
In 1911 the Swiss switched to non-corrosive primers, appropriate for their militia system. Our first weapon with 100% non-corrosive primers was the WWII M1 Carbine, a weapon for officers and rear echelon troops.
So the likelihood of a less organized having a lot of functioning weapons increases with their using non-corrosive primers. Or, in the case of the Soviets, using chromed barrels.
Now you have to factor in wealth. Poor people who can't afford much in the way of weapons aren't going to have a chance here. See e.g. Rwanda, where rifles didn't play a big part on either side.
So ... what examples might we have? The successful resistance to the Soviet invasion of Afghanistan is suggestive. You might count Hitler deciding it wasn't worth breaking 80 divisions to take (most of) Switzerland.
More than a few liberals had an epiphany about gun control in the dark days of Watergate ... how many dictators/oligarchs/tyrannical whatever didn't try, or try very hard, because the cost would have been too great?
I'll start looking for examples; today, all I know is case after case, USSR, PRC, Cuba, Nazi Germany, those are just the most prominent off the top of my head, where gun confiscations preceded slaughter.