Only once, and by poachers...
My father (retired police officer) and I were fishing in a remote canal system near Englewood florida, the water was brackish, and we were after Redfish. We had pulled up along a big bend of cattails and had tied off to some cattails. It was about 15-20 minutes and suddenly you could hear a singing zip and the sound of cattails breaking. Turns out a gator had come over near us and pulled up on the far side of us along the cattails, just out of our direct view. The poachers who came down the canal didn't see us on the far side of the bend up against the cattails and opened fire on the gator, the gun was semi-auto. At least one shot did hit the gator because it went into spinning throes... it was hit in the head. I don't know how many shots were fired, but I think 5. We didn't stay around to bitch at the poachers, and we quickly kicked it up and got the hell out of there, taking part of the cattails with us. From then on, me and my dad fish with at least one gun on the boat.