Jonathan Broxton (3-2) took the mound in the top of the ninth with Los Angeles holding a 5-4 lead. Broxton loaded the bases with one out and found himself out of the game after acting Dodgers Manager Don Mattingly stepped off the mound during a conference with Broxton and then stepped back on.
George Sherrill was hustled into the game and surrendered the game-winning double to Torres. Travis Schlichting took over and gave up an RBI single to Buster Posey.
Santiago Casilla (3-2) recorded the win in relief of Giants' starter Tim Lincecum. Jeremy Affeldt was credited with the save.
The Dodgers got a two-run homer from Andre Ethier in the first inning and took the early 3-0 lead.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need