Anthony Silerio was taken into custody Wednesday, according to the Ventura County Sheriff's Department.
Kaylana Davis was initially in a coma after being wounded in the head, investigators said, and her mother Maryam was struck in the leg. The girl is still being treated at Children's Hospital Los Angeles.
Three other family members, including an adult and two children, were inside the residence with them when the shooter opened fire into the home, sheriff's officials said.
MORE: Pregnant mother wounded, 7-year-old daughter in coma following shooting in Port Hueneme
Silerio was booked on suspicion of attempted murder, shooting at an inhabited dwelling, assault with a firearm, and street terrorism.
His bail was set at $1 million.
Immediately after the shooting, Kaylana's father picked her up and ran to a nearby Ventura County Fire Department station for help, accompanied by her wounded mother, investigators said.
According to police, medical aid to the victims was initially delayed because the firefighters feared for their safety due to the gunfire.
Ventura County Fire Chief Mark Lorenzen later disputed that characterization.
"After thoroughly reviewing our station video footage and the exact timeline of our response, it's evident that Fire Station 53 responded in a timely, prudent and professional manner to this incredibly dynamic incident," Lorenzen said in a video message, adding that crews were outside and prepared to render aid within two minutes of being notified.