It's the city's first homicide of 2018.
"It's tragic and we're obviously disturbed as a community," Porterville Police Lt. Dominic Barteau said.
Police were called to Sierra View Medical Center at around 9 p.m. on Monday.
When they arrived, they say the five-month-old was already dead. The child had major injuries, but police aren't describing them in detail at this point.
Police interviewed family members at the hospital, and then served a search warrant at a home on South G Street, where they say they found evidence connecting Castro to the crime.
Police believe she killed the baby there, but it's unclear exactly when it happened.
"That will all be determined through the examinations that were done at the hospital and through the autopsy examination," Barteau said.
Police say Castro drove her baby-girl to the hospital, but it's unclear who else was in the car. After interviewing her at headquarters, police arrested Castro. The child's father was also interviewed but released.
Castro is expected to be arraigned at the Tulare County Pre-Trial Facility on Thursday. She's being held there without bail.