I agree with targor here, character is one thing the series does well, one of the problems is that it often sacrifices plot for character, that is having to have awesome character moments created by bending the world around those moments, EG voldemort's wand in goblet of fire spewing out shadows of the people he killed.
How well this works for you likely depends upon whether you want strictly explainable magic of the brandon sanderson systematic variety, or are happy to just run with things in terms of the character as is.
For me, I'm mostly happy to run with things, it's just some of the stupider conveniences and blatant deus ex moments that tend to get on my nerves, but obviously everyone's mileage will be different, and the said about crimes of grindlevalt the better .
As to Chris's question, interestingly enough, in the harry dresden series someone actually does! take out harry that way with a sniper rifle, however in Dresden magic is far more low key and based on devices rather enate power.
I suspect if someone tried to shoot voldemort with a gun one of several things would happen.
Either A, the gun would simply backfire if it was too technologically complex, one reason wizarding technology is stuck in the nineteenth century is that electricity and magic don't tend to get on well.
2: Voldemort's mind would simply cause the shooter to drop their gun/hand grenade/rocket launcher before firing, since remember, muggles have no defense against mental powers at all, and we know how strong in mental magic voldemort is.
3: Even if the shot actually hit, we already know clothes can be magically enchanted, EG the weesley twins shield hats, so I'd be willing to bet the shot would just bounce off, indeed I suspect this is one reason for wand combat, since anything without a wand is likely to bounce off an experienced wizard.
I will say one thing which does bother me in a lot of urban fantasy novels, not just Harry Potter, is why exactly all the magical things have to hide from normal humans at all, since yes, wizards pretty much could rule the world if they tried.
It's unfortunately a catch 22 in the very concept of urban fantasy, if you have an alternative world of powerful magic going on under everyone's noses, there has to be a reason nobody knows about it and why the paranormal/magical things hid from humanity.
In some universes like Buffy they simply take the step that the vampires/demons etc actually don't! hide from humanity at all, but their activities are so specifically fringe that nobody really bothers about them accept their victims, EG all those people getting mugged in the park might not be getting mugged.
In some other worlds like Tim Powers alternative history, there is usually a big gaping flaw in magic, or something in modern tech that negates magic.
So for example, in his book on stranger tides, all the pirates use voodoo magic, however voodoo is completely negated by the touch of iron, whilst in his book the anubis gates, since all the magic is pretty evil necromantic stuff, it's actually been quite justifiably stamped out, ---- well mostly.
Then there's the other extreme, the lovecraftian, "well the demons and great old ones exist, and really don't care what most of humanity do" angle, which also works.
either way, this is I think more a weakness of the genre, than a specific complaint of Harry Potter, and one reason why i personally don't tend to enjoy urban fantasy as much as straight up fantasy set in completely other world where magic is a part of everyday life.
With our dreaming and singing, Ceaseless and sorrowless we! The glory about us clinging Of the glorious futures we see,
Our souls with high music ringing; O men! It must ever be
That we dwell in our dreaming and singing, A little apart from ye. (Arthur O'Shaughnessy 1873.)