The shooting took place at the Santa Clara Valley Transportation Authority (VTA) rail yard in San Jose.
Officials say the victims include multiple transit employees. The suspect, an employee, is also dead.
The shooting broke out around 06:45 local time (14:45 GMT).
Officials say the suspect may have set his home on fire before the attack.
Across the US, there have been 230 mass shootings so far this year, according to the Gun Violence Archive. A mass shooting is defined by the group as a crime in which four or more people are fatally shot.
Early on Wednesday, the gunman opened fire in the VTA light rail yard. According to a local CBS station, shots rang out during an employee meeting for rail workers.
Police officers arrived at the scene while the shooting was ongoing, officials said.
"Our teams showed exemplary behaviour - what they're trained to do - as shots were still being fired," said Santa Clara County Sheriff Laurie Smith at a press conference.
Nine people, including the suspect, are dead. US media report that the gunman died by suicide, but police have not confirmed.
Law enforcement officials told CBS News, the BBC's partner in the US, that the gunman is 57-year-old Samuel Cassidy.
Deputy Russell Davis, a spokesman for the Santa Clara County Sheriff's Department, said "deputies did not exchange gunfire" with the suspect.
"Preliminarily, we're going to go with the assumption it was a self inflicted gunshot."
Just before the shooting, a fire broke out at a home belonging to the Santa Clara VTA employee, according to local media.
Authorities say they are looking into whether the suspect may have set his home on fire before embarking on the rampage, but they have not confirmed.
San Jose Fire spokeswoman Erica Ray said that officials are investigating "multiple" crime scenes related to the shooting.