Whitted and Deputy Erik Rueppel were conducting a traffic stop nearby when they noticed the car appeared to be stuck on the tracks.
"I can't say why I did it or why someone else wouldn't do it. At that point, it's just instincts that kick in. You don't have time to analyze the situation. I knew that my job, working in law enforcement is to preserve life, and that's what I did," Whitted told the San Francisco Chronicle.
A video posted by Paulo Coelho shows the same incident as seen from the other side of the tracks.
Investigators said they discovered Gomez had allegedly hit a parked car and an unoccupied bicycle shortly before he drove through the crossing guard arms and became stuck on the tracks. He was treated for minor injuries at a local hospital and cited for drunken driving, hit-and-run, driving without a license and a probation violation.
Caltrain spokeswoman Jayme Ackemann praised the deputies.
"These incidents aren't just hard for the families of the victims, they're hard for our engineers and crew on board the train, so we're grateful that tragedy was averted because these two deputies were in the right place at the right time," she said.
Meet Deputies Whitted & Rueppel. They pulled a man to safety and saved a life. #heroes #thank you @SMCSheriff pic.twitter.com/k0L9mtVzuV— Caltrain (@Caltrain_News) August 4, 2015