Like others have said it could be the spring has lost it's tension, but you can also check the gate to see if its worn.
Take your cylinder out and eyeball the gate hinge while you open and close the gate. Make sure the end of the spring is not overlapping the recess on the gate. The spring is designed to glide in this groove/recess over a high spot on the groove. If this high spot, or spring, is worn down the gate may lose its ability to stay firmly closed.
note: You will only see the end of the spring, the spring itself is housed in the frame.
Gun permit?? A bread crumb tossed to a sleeping society awoken by the sound of complacency. "They are for your own good", and "you will understand when you see all the lives they save". Yes master, what else will you toss me from your bag of infringements?? Do you want me to roll over and play dead? I do that very well. --skidder