Gallagher (2-1) allowed one run and four hits in a career-high seven innings while striking out three and walking two.
The Dodgers got an RBI single from Blake DeWitt in the fourth, but the third baseman's error in the seventh allowed the tying run to score and helped turn what looked like a win for Hiroki Kuroda (2-4) into a loss.
The right-hander, who won his previous start, was charged with two runs (one earned) and seven hits while striking out three and walking three. He left with a 1-0 lead after Alfonso Soriano, his teammate with the Hiroshima Carp in 1997, lined a single to left with one out in the seventh, putting runners on first and third.
Jonathan Broxton came in, and third baseman Blake DeWitt immediately booted Mike Fontenot's slow roller, allowing Ryan Theriot to score the tying run from third. After Derrek Lee flied to right, Ramirez drove in Sorioano with a single to center and Fukodome followed with a double down the left-field line that drove in Fontenot.
The Dodgers loaded the bases against Carlos Marmol in the eighth but stranded the runners after coming up empty twice in similar situations during Monday's 3-1 loss to Chicago. Marmol struck out James Loney and Matt Kemp grounded into a force to end the threat, and the Dodgers stranded eight runner after leaving 12 the previous day.
Kerry Wood then pitched a scoreless ninth for his 12th save in 16 chances, the crowd chanting "Kerry! Kerry!" before Russell Martin grounded out to end the game.
[Associated Press; By ANDREW SELIGMAN]
Copyright 2008 The Associated Press. All rights reserved. This
material may not be published, broadcast, rewritten or