Matt Kemp's two-run home run in the bottom of the 12th inning sent Los Angeles to a 5-3 decision over Philadelphia in the finale of a three-game set.
Jake Diekman (1-1) retired the first batter he faced, but walked Mark Ellis before Kemp cleared the wall in right-center with plenty of room to spare to end the game.
"It was a fastball over the middle," Kemp said. "Every walk-off you feel good. Hopefully we can take this confidence on the road."
Jamey Wright (4-2) stranded runners on the corners in the top of the frame to earn the win.
Kemp ended up with two hits and three RBI for the Dodgers, who avoided a sweep and snapped a four-game skid.
"Matt had two big hits and that last one was monstrous," Dodgers manager Don Mattingly said. "It was a nice win for us."
Hunter Pence knocked in a pair of runs and Carlos Ruiz added an early RBI for the Phillies, who saw their franchise-record seven-game win streak at Chavez Ravine come to an end.
"This is tough, but we have to move on," Phillies manager Charlie Manuel said. "We won two series and we could have come home 5-1, but today we didn't get it done."
Pence came up with a two-run single with the bases full in the top of the 10th which gave the Phillies a 3-1 edge, but Jonathan Papelbon allowed LA to equalize in the home half on a bloop RBI hit from Bobby Abreu and a run- scoring infield hit from Kemp.
Josh Lindblom held the fort for the Dodgers in the 11th and Diekman left two on in the bottom portion.
In the 12th, Wright then gave up a single to Shane Victorino and intentionally walked Chase Utley after Victorino stole second. Ruiz flied out and a fielder's choice grounder from Pence left men on first and third, but Juan Pierre grounded out.
Juan Rivera barely cleared the wall in left-center off Phils starter Cliff Lee to put the Dodgers on the board to start the home second. It was one of just two hits the left-hander allowed over eight solid frames.
Victorino began the fourth with a single, stole second and came in on a one- out base hit from Ruiz. That was the lone run Dodgers starter Clayton Kershaw permitted in his eight full innings.
Kenley Jansen managed to load the bases with two outs in the ninth thanks to singles by Ryan Howard and Placido Polanco with a walk to John Mayberry, but survived the inning when pinch-hitter Jason Pridie flied out to short left.
Four Phillies pitchers took the hill in the bottom of the ninth, and it was Michael Schwimer who fanned pinch-hitter James Loney with the bases loaded to send it to extras.
For Kemp, it was his sixth career walk-off home run...With a win Wednesday, the Phillies could have tied their longest road winning streak against the Dodgers in franchise history, which came from July 6-September 21, 1957 against Brooklyn at Ebbets Field...The Dodgers improved to 4-2 in extra-inning games, while the Phillies fell to 2-8...Thanks to his four-RBI performance over the last two contests, Pence upped his average to.474 (9-for-19) with one homer and 11 RBIs with runners in scoring position since June 28...The Phillies on Wednesday activated right-hander Justin De Fratus from the 60-day disabled list and optioned him to Triple-A Lehigh Valley.