After the Cardinals tied the game at 3-3 with two runs in the top of the sixth, Carl Crawford raced around the bases to score from first on Ellis' liner into the left-field corner. The Dodgers added an insurance run in the eighth on Juan Uribe's two-out RBI double.
The Dodgers combined for four doubles, moving out of last place in Major Leagues in that category.
"Those are momentum changers," said Gonzalez, who broke out of a 2-for-26 skid with three hits to finish a triple shy of the cycle. "The more we can get them, the better we will be."
Gonzalez helped the Dodgers to a 3-1 lead through five innings. He doubled to center to score Nick Punto in the first. The first baseman plated Punto again in the third with a single. In the fifth, Gonzalez launched his first homer since May 10 into the right-field bleachers for a solo shot.
"Adrian's been huge," manager Don Mattingly said. "He's been getting his hits all year long. He had a little bit of a spell lately where his average has dropped, but he's been huge. He gets so many big hits."
Punto had two big hits of his own, including a double, to set the table for Gonzalez and raise his average to .340.
"He's a very energetic guy," said Gonzalez, who leads the Dodgers with 33 RBIs. "He's had an incredible year. He's having great at-bats, getting on base and getting hits. He's creating a lot of different things for us."
In his first start since returning from the disabled list, Ted Lilly gave the Dodgers a chance to win, but settled for a no-decision. The left-hander allowed two runs (one earned) on two hits over 5 1/3 innings, with three strikeouts.
Lilly retired 14 batters in a row after the Cardinals loaded the bases with two outs in the first, following an unearned run. The streak ended when Lilly walked Matt Holliday with one out in the sixth to complete his outing.
Lilly walked off the field to a standing ovation. It was a stark contrast to the last time he pitched in Los Angeles, when he allowed five runs on eight hits in three innings against the Rockies while pitching through a rib injury.
"I think it's the best I've thrown the ball in a long time," Lilly said. "I'm happy with the direction and I'll take that and continue to try and get better."
But Ronald Belisario could not hold the lead. The right-hander gave up three hits to five batters as the Cardinals scored twice to tie the game at 3-3. Belisario has allowed 10 of 14 inherited runners to score this season.
Punto helped out Belisario with a key defensive play against his former team, keeping a screaming line drive by Pete Kozma in the infield for a single that prevented the go-ahead run from scoring.
"That ball Kozma hits down the line, if Punto doesn't come up with it, it's a whole different game," Cardinals manager Mike Matheny said. "A couple runs are going to score right there. He made a terrific play just to hold Kozma to a single."
Paco Rodriguez relived Belisario and got pinch-hitter Matt Adams to pop out with the bases loaded to end the threat. The rookie left-hander retired the only two batters he faced in the seventh to earn his first Major League win.
Kenley Jansen followed with 1 1/3 scoreless innings, striking out four, and Brandon League fired a 1-2-3 ninth for his 10th save.
Dee Gordon snapped an 0-for-25 skid with a single in the fourth, his first plate appearance following a cramp in his left hand in the top of third inning.
Cardinals rookie starter John Gast exited the game in the bottom of the second due to left shoulder tightness. Joe Kelly relieved the left-hander and allowed two runs on five hits in three-plus innings, with six strikeouts.
The Dodgers managed only three hits in the series opener on Friday night, but surpassed that number by the fourth inning on Saturday.
While the Dodgers remain in last place in the National League West, they have a chance to win their fourth series this month with Clayton Kershaw scheduled to start in the finale on Sunday afternoon.
"It's big," Gonzalez said. "We've got to score runs tomorrow so Kersh can do his thing. It will be huge."