It's a load of crap to say anyone can use a gun but a sword takes years of training. Having never handled one outside a military ceremony, I've never wielded a sword, but I'm pretty certain I could pick one up, run outside, and kill someone with it. It wouldn't be elegant, or efficient, but it would be effective. If I were to trade my sanity for a sword, anyway.
To use a sword well, and to be confident you can kill someone who is similarly armed, takes years of training and experience, I'm sure. To use a gun equally well also takes a considerable amount of training and experience. It may not be romanticized like a "gentleman's duel" but taking a shot from 800 meters and actually hitting your target, that's not something everyone can just pick up and do. Try hitting multiple targets in less than a second, not with the old spray and pray approach, but one shot each.
If you don't see the elegance of a skilled marksman at work, then it's because you're closing your eyes and focusing on the unskilled shooters who give guns a bad name. Because you're not seeing unskilled swordsmen hacking away with an over-sized knife. Those terrorists and school shooters someone mentioned earlier could have just as easily picked up a sword and walked into a public place, hacking up at least a few people before someone stops them. They won't do it with style or precision, but people will die regardless. Just like when they empty the magazine into an unarmed crowd.
Summary/TLDR: A weapon is a weapon. Whether you are skilled with it or not you can kill someone. There are skilled users of all weapons, but the majority will be unskilled. Firearms are more common today than swords, therefore most examples of firearm use will be from unskilled users, and most examples of sword use will be from collectors and those who have a specific and dedicated interest in their use, therefore the elegance of a skilled shooter is lost to those who do not look for it.
Damn, even the TLDR is a paragraph. My point must be far too complicated for the internet.