A poster on another board asked a very similar question a few months ago, and copy/pasted below is my response. (Very slightly edited and highlighted in bold in some relevant spots)
I am not a psychologist, but I do teach Psychology, and I know a little bit about dreaming and subconscious states. This type of dream is very common, and comes in two parts.
The first part is the "menace". The menace of the dream varies from person to person, but it always behaves the same way: It simply presents itself and attacks. The menace is usually silent (doesn't speak), because it doesn't have any actual motivation other than to 'get you'. For some people it is a dog biting them, for some it is a faceless criminal attacking, for some it is their evil stepfather. Whatever the 'menace' is, it represents very basic fear and anxiety. How the menace is manifested is relatively unimportant, because it almost always represents a feeling of fear or anxiety stemming from some uncertainty in the dreamer's waking life. This may be related to guns or personal security (as the OP alluded to) but it could just as easily stem from some other source of anxiety (work, relationships, money, etc.).
The second part of the dream is the "paralysis". The paralysis is the inability to respond effectively to the menace. Some people will dream that they need to throw a punch, but their arm won't function properly. Some people will dream that they get in their car to escape, but the car won't start. Gun owners, particularly new ones, would logically dream about a gun that won't funcion properly. As with the 'menace', the 'paralysis' almost always means one thing. The paralysis symbolizes a loss of, or lack of, control. When we feel as if we are unable to control something in our waking life, and the malfunctioning (paralyzed) tool or body part in our dreams represents our fear that we are (or will be) unable to control whatever is causing anxiety in our waking life.
Just to be evil, the subconscious will usually represent the loss of control through a malfunction of whatever our source of physical power is in real life. Paralyzed arms or legs, non-functioning guns, and (fairly commonly) the loss of one's teeth are all examples of this sort of 'malfunction dreaming'. Whatever makes you feel powerful in your waking life is what your subconscious will destroy in your dreams. It is only natural that a person who sees guns as a source of power and control will experience the malfunctioning of guns during anxiety/paralysis dreams. (I told you your subconscious was evil).
OP, I would imagine that you were pretty spot-on with your observation that this sort of dream is common among gun owners, especially new gun owners. Buying a gun means that one has accepted a broad personal responsibility with many variables which might be out of one's control. Break-ins are sudden and unpredictable, and psychologically, the purchasing of a firearm has fostered a hightened sense of responsibility for the outcome of a break-in. Yet, the fact remains that simply owning a firearm does not guarantee successful outcomes. The brain (naturally) has a difficult time contending with the cognitive dissonance that results from those competing ideas, and menace/paralysis dreams are a fairly cut-and-dry representation of the way the subconscious would contend with that sort of problem.
The best thing to do if one is suffering from these sort of dreams is to stop putting off fixing whatever the source of anxiety is. Our dreams are mostly manifestations of thoughts that we repress (or insufficiently address) in our waking lives. Participation in society often requires us to have the ability to push back uncomfortable thoughts and feelings while we are awake, but when we go to sleep, our subconscious has free reign to bring out whatever issues we've put on the backburner and throw them right in our face. If we want the dream to stop, we need to identify what troubles us and deal with it safely and constructively. Resolve the repressed thoughts, the dreams will stop.