When my son was about 3 or 4, I took him outside and shot a 2liter jug of water with a 12 gauge shotgun at close range while he stood beside me. It appeared to explode and spewed water everywhere, dramatically making an impression. I showed him the shotgun and said "Now remember: guns have no brain. They will destroy whatever is in front of them, so the person operating the gun had better use his brain about where he points it." I went on to tell him that he was not to touch any gun without my permission and presence, and that to do otherwise would be Big Trouble... but that if he wanted to shoot, all he had to do was ask me and we'd go outside and shoot guns. This got the point across while allowing him a means of satisfying his curiosity safety, removing the "allure of the taboo" from guns.
I did something very similar with power tools and a circular saw, to educate him on their dangers.
Any time he wanted to shoot, I'd make time for us to go out to the backyard range. At 4 I let him shoot 22's, I'd kneel behind him and keep my hands on the weapon as he fired it. I constantly repeated the three fundamental rules of safety (don't point, finger off trigger, assume loaded) until he could recite them verbatim.
Later I began more seriously training him in safe gunhandling methods and marksmanship, and let him shoot anything I own. I also started filling him in on the basic legalities surrounding guns as soon as he could understand.
At 13 I gave him the combination to the gun safe, but told him never to open it without me unless there was a bona-fide emergency and I wasn't there to handle it. By this point guns were no mystery to him and there was no reason to "sneak a peak" or "play with them" ... he knew all he had to do to handle or shoot any gun in there was to ask me.
We hunt. By the time you've killed a few rabbits and skinned them and cleaned them, you have no illusions about what guns do to living beings.
He was also raised to respect human life and hold it as sacred, as part of our religious beliefs; and that human life must never be taken except in dire necessity.
We've never had an accidental discharge and he's never done anything stupid with guns. At 16 he's a pretty good shot and very meticulous about safe gun handling.