Part of the problem is that places where people want gun control tend to be large compact urban areas, where it's obvious that a lot of social control is needed. So when they perceive a problem with increasing crime they tend to push for gun control.
Other places, when people perceive a problem with increasing crime they tend to push for harsher sentences, particularly harsher sentences for people who use firearms during their crimes.
For the most part, neither approach is effective.
I will address this from my experience in Canada. In 1962, people who committed first-degree murder were executed by hanging, and the crime rate was much lower than it is today.
In 1968, Pierre Trudeau was elected Prime Minister, and he brought in many controversial changes to our laws. He changed us over to the metric system, and he abolished capital punishment, and he brought in gun control laws (even in 1962, guns were more restricted in Canada than in most of the U.S., of course).
After our crime rate peaked in 1971, it has since declined due to demographic changes, but it is still much higher than in 1962.
Gun control places restrictions on law-abiding citizens, since it limits what they can do to defend themselves, and it makes it easier for the government to crush resistance if it decides not to hold the next election. Trudeau expresses admiration for Mao Tse-Tung back in his student days, and in various other ways made many Canadians nervous. Gun control may not stop drug pushers from getting guns, but it does make life safer for police officers dealing with domestic violence complaints, so there is one case where it is protecting some people from crime.
Harsh sentences for criminals, in themselves, at least only hurt the criminals.
If you really want to avoid crime, the solution, though, would be: ensure just about every young man who leaves high school can get a job that pays well enough to
start a family. We had that situation in 1962, thanks to the economic boom, and thanks to the country having lots of wide open space. Now, the economy has changed, and we've let in a great many immigrants despite elevated levels of unemployment.
If the steel mills and the car factories have shut down, so that a young man trying to start out in life doesn't have a chance of earning a reasonable living through honest labor - and a reasonable living means the ability to support a wife and children - then instead of being content to work merely to survive for the rest of his life, that at least a fraction of them will opt for drugs and guns and causing trouble is only to be expected.
People need to be kept in line by force
when there isn't enough to go around. So the solution to crime, and the way to avoid a harsh repressive regime, are the same: plan ahead, make sure this situation does not arise.