Police said the two students were not believed to have been targeted by the gunman but were wounded because of their proximity to the slain woman.
San Bernardino Police Chief Jarrod Burguan called the shooting at North Park Elementary School in San Bernardino, about 65 miles east of Los Angeles, an apparent murder-suicide.
Investigators were working to confirm the identities of the gunman and the dead woman to determine their relationship, if any, and whether the shooting stemmed from a domestic dispute, police Captain Ron Maas said at a news conference.
The wounded students were hospitalized but their medical conditions were not immediately known. Maas said they were not related to either of the dead adults.
The city of San Bernardino was the scene of a shooting rampage on Dec. 2, 2015, when a husband and wife, who authorities said were inspired by Islamic extremism, killed 14 people and wounded more than 20 others at a holiday office party. The couple, Syed Rizwan Farook and Tashfeen Malik were killed by police during a shootout.
Authorities provided few details about the circumstances of the North Park Elementary shooting, except to say that the gunman had gained entry to the school as a visitor and kept his weapon concealed until he opened fire inside the classroom.
The school was evacuated and students were bused to the campus of California State University at San Bernardino to be briefed and interviewed by authorities. From there, they were to be taken to a nearby high school to be reunited with their families, police said.
Aerial television footage from the scene showed children holding hands and walking single-file across the campus from the school building to waiting buses.
One young student, reunited with her mother, told local NBC News affiliate KNBC-TV that the incident left her "super scared." Anxious parents interviewed on camera said they had been given no information from the school other than where their children were being taken.
School officials said North Park Elementary would remain closed for at least two days.
Thumb Credit: Reuters