I was able to get into my dad's locked gun closet by the time I was six (maybe earlier, but I can't remember). I could either get the key, which he kept in a predictable place (NEVER assume that because it's in up high a kid can't get to it), or wiggle through a hole under a workbench in another room that lead into the closet (the other room was a workshop that has never been completely finished), and so there was no wall board between the closet and the workshop in that one spot).
Like grisly I had been taught about guns from a young age, though, so I never did anything stupid with them.