No, gangs aren't going to go away, but they will be reduced in capability and law enforcement will be far more effective. Crime will go down. Not instantly, but over a fairly short amount of time.
For a historical analog, look at the Mafia. When Prohibition ended, the Mafia didn't become nice people. They continued a life of crime. However they had diminished power, and we had fewer open gun battles in the streets. On the whole this was a good thing.
http://www.tdpf.org.uk/blueprint%20download.htm
"After the War on Drugs: Blueprint for Regulation"
With regards to effect, though, I'm sure it wouldn't magically fix everything. It would, however, mean that the cartels would face competition without the overhead of smuggling, which would drop the profit available substantially. They might well move on to smuggling the next most profitable thing, but obviously the next most profitable thing is not as profitable. The power and wealth of the cartels would thus not be growing as fast as it is, which is a much better situation long-run.
It's hard enough to get pot legalized in most states - the "harder" drugs don't stand a chance.
And even if they were legalized, it's not even possible for a big illegal drug operation to "go legit". All of the drug cartels will still have long histories of violence, piles of cash, boatloads of weapons, and a ton of smuggling expertise. They'll probably just "pivot" to smuggling the next most profitable thing. Or smuggle untaxed and unregulated drugs.