Authorities determined the valve, located on the roof of the school at 12250 Skyline Blvd., had been turned on and left open, PG&E spokeswoman Tamar Sarkissian said.
The valve fed gas to Bunsen burners in a room that is no longer used for science classes, Sarkissian said.
"School maintenance shut that valve off and isolated it so this can't happen again," Sarkissian said.
The incident was reported at 9:38 a.m. and prompted students and faculty to evacuate the school.
The students ended up being dismissed for the day as a result of the incident, Oakland Unified School District spokesman Troy Flint said.