The Dodgers had tied it up in the eighth when Giants starter Matt Cain's wild pitch allowed pinch-runner Alex Castellanos to come home from third.
The victory allowed second-place Los Angeles to move back within 4 1/2 games of the National League West-leading Giants following their 5-2 loss to San Francisco Friday.
Ronald Belisario (5-1) earned the victory in relief of starter Chris Capuano, who limited the Giants to two runs on five hits over seven innings.
Cain yielded two runs on six hits over 7 1/3 frames for San Francisco.
Buster Posey and Brandon Belt drove in runs for the Giants.
Astronomers offer more expansive view of universe
Attkisson leaves CBS News, reportedly over network's 'liberal bias'