That depends. Typical lawyer answer I know but you always have to look at your written agreement and see if there is anything in the lease that addresses it. If the lease doesn't help with the answer then you have to look for facts that justify rescission of the lease.
If the neighbor with the gun is also a tenant of the same landlord, then if the landlord does not take adequate steps to remove the threat then that can be grounds to break the lease.
You can often rescind a lease if you can show that the Landlord was aware of this kind of activity in the past and did not tell you about it. However, if is very difficult to prove. In order to seek rescission your going to have to find some action or lack of action on the landlord's part.
If there was a real estate agent involved in negotiating the lease, you can also look to the conduct of the real estate agent as often landlords do not negotiate their own leases and the conduct of the agent can bind the Landlord as well.
From a bigger picture, if your afaid then accepting whatever penalties apply is much better than living in fear. If you want to send me an email with your lease, I will take a look at it and see what kind of options you may have.
One thing people don't seem to realize. Leases are contracts, and contracts are made to be broken. Well, you're supposed to keep your word, but if you can't for some reason the law recognizes that the non-breaching party is entitled to contract damages. In the case of a lease, if you move out before the end of the lease, you are still responsible for the remainder of the rent. However, the landlord has to try to mitigate his damages, that is, he has to try to get a new tenant in there paying as much or more than you did. Then you're responsible for whatever rent he didn't collect.
You can't break the lease because of neighborhood crime, except under very narrow circumstances that don't apply here. HOWEVER, I would move. The landlord will have to sue you for the remainder of the money, but will he? If I were the landlord, I wouldn't bother.