The incident took place on the 3800 block of Caminito Aguilar and was reported at 3:15 p.m. Saturday, San Diego police said. The girl's father drove her to a fire station at 5855 Chateau Drive instead of waiting for an ambulance to arrive, police added.
Both parents and two siblings were home at the time of the incident, according to police. The girl was listed in stable condition at Rady Children's Hospital and was expected to be OK.
Police did not say how the girl got access to the gun, where she found it or to whom it belongs.
No arrests have been made. The investigation is ongoing.