The victim, a man, was shot while inside the gym and quickly rushed to Community Regional Medical Center.
Officials say the gunman left the scene in an SUV.
Investigators say it appears the shooting happened after an argument broke out during a basketball game.
"What we've learned so far is that there was some sort of argument during a recreational basketball game that led to that one person being transported from this location to CRMC," said Lt. Mark Hudson.
The bullet grazed the victim's head and he is expected to survive from his injuries.
Several people were inside the gym at the time of the shooting and officers say witnesses are cooperating with the investigation.
Anyone with additional information is asked to contact the Fresno Police Department.