Banning drugs and weapons are not really relatable. Drugs are small (sold by the gram), evade metal detectors, are of extremely low cost to produce illegally, or low cost to acquire, do not require any degree of mechanization, acquirement of base materials, or the production of a heat footprint to manufacture, are easily transportable, of low weight, and do not require any mechanized skill to create (no moving parts, low expertise, etc.). Banning guns would be much, much easier than banning drugs, because the opposite is true in each of the above categories. After the first decade or two, the guns already in circulation would be breaking down, have been identified, or would be of such value that they'd be very unlikely to make public appearances. You can't ever eliminate a controlled target completely, but guns are easier than most things because the average joe can't just make one at home (at least not effectively on a macro-level) and importation of illegal guns would be extremely difficult logistically. And we haven't even discussed the second prong, which would be an ammunition ban as well.
It would be much easier to stop gun smuggling at our borders (you'd need trucks, large cargo movement capability, and would have to evade metal detection). It would be much easier to halt domestic production of guns (you'd need factories, raw materials, and high-skill laborers in a large, hot building). It would be much easier to track and halt internal black markets (for many of the above reasons).
And finally, what most fail to appreciate is that, given all these limitations, guns, which are now of low cost, would instantly skyrocket in black market value and cost. Low-level street people -- your typical housebreaker or stickup artist -- simply would be priced out if guns became a scarce, illegal commodity. Further, low level junkies etc. are not likely to hang on to objects of high value, as those things tend to be the first thing that gets pawned. Add in stiff penalties for mere possession, and you'd find it easier to ban guns than you'd think, IMO. International examples bear this out quite clearly.
Not saying we should ban guns, just saying that it's possible to do much more effectively than drugs. Drugs have extremely high value at low weight, meaning it is profitable to smuggle small packages into the and around the country. This does not apply to guns. I think a ban would work, given two decades of leeway.