Welcome aboard
The Alligator Gar probably injured itself by slamming into the glass or jumping. Only suggestion I have is lower the water level and wait to see if it improves. Tbh in most cases a Gar will have a spinal injury and back will remain bent.