"That was great," said Penny (16-4). "They supported me and they bailed me out."
Penny, who also won 16 last year, certainly wasn't at his best this time out. He allowed four runs, three earned, in five innings, but Garciaparra hit a solo homer to highlight a four-run fifth inning.
The loss trimmed the West-leading Diamondbacks' lead over the Padres to three games.
Los Angeles manager Grady Little liked the way the Dodgers kept fighting back.
"To be able to come back and get that one tonight was big for this club," he said. "We had a little bit of a struggle there in the early innings with our starting pitcher, but he got through it. He was all over the place with his command, but he battled through it."
Asked about Penny equaling his career high in wins, Little said, "He deserves it. He's pitched well for us, and pitched in some key spots. Tonight was another one of those."
Garciaparra, who has been slowed by a strained left calf at times this year, went 3-for-4, including a double.
"Nomar had a very big game," Little said. "Nobody's more proud to see that than I am. It's a good time for him to get hot."
Garciaparra called the victory a "collective win."
"Those were some timely hits by (Andre Ethier), and Brad kept us in that ballgame so we could go out there and do what we did," he said. "Right now, winning ball games is all we're focused on and care about.
"Everybody's been doing the little things that you don't see in the box score that helped us win today."
The Dodgers finally scored their first earned run against Doug Davis and finished with six runs -- four earned -- against the Diamondbacks' left-hander.
Davis entered with a 3-1 career record against Los Angeles, and hadn't allowed the Dodgers an earned run during his four starts spanning 30 innings. James Loney's RBI double in the first inning quickly ended that streak.
Davis (13-12) gave up nine hits, including Garciaparra's seventh homer, walked three and struck out five in 4 2/3 innings. The loss was only his second in his past 10 decisions.
"I made some mistakes, especially in the fifth inning," Davis said. "I was getting behind guys, and when I do that, it doesn't matter what team I'm facing.
"They're going to get better swings, better hacks, and that's pretty much what happened."
Penny, taken out for a pinch-hitter after throwing 103 pitches in five innings, allowed six hits that included Mark Reynolds' two-run shot in the fifth. Penny walked three and struck out six.
Trailing 4-2, Los Angeles pulled within a run when Juan Pierre walked leading off the fifth, went to third on Loney's single to right and scored one out later when Jeff Kent grounded into a double play.
The Dodgers then tacked on three more runs with two outs. Garciaparra drove the ball over the fence in right-center to tie the game, then Russell Martin reached on shortstop Stephen Drew's fielding error. Matt Kemp followed with a triple to give Los Angeles its first lead of the game, then Ethier singled him home to make it 6-4.
Ethier added another RBI single in the seventh inning.
Arizona had taken a 4-2 lead on Reynolds' 14th homer in the top of the inning.
The Diamondbacks had taken short-lived leads in the first, second and fifth innings. The Dodgers responded by tying it the first two times, 1-1 in the opening inning and 2-2 in the fourth, before rallying again in the fifth.
Said Arizona manager Bob Melvin: "It's unlike Doug to go out there and give it back. Every time we scored they ended up answering."
- Arizona 2B Augie Ojeda was a late scratch and Emilio Bonifacio started at second and batted leadoff for the third time this season. Bonifacio had two hits and scored a run.
- The Dodgers honored Hall of Fame manager Tommy Lasorda with a pregame ceremony noting his upcoming 80th birthday, which is Sept. 22.