PHOENIX -- Tony La Russa gambled and lost on Thursday night, a rare miscalculation in a dominant St. Louis season.
The Diamondbacks snapped a six-game home losing streak.
With the score tied at 1, John Mabry -- 3-for-4 for the Cardinals -- led off the ninth with a single, then moved to third on a sacrifice bunt and groundout. That's when La Russa chose to allow starter Jason Marquis to bat against reliever Lance Cormier.
"I knew he had a good batting average, but still it's a pitcher out there," Gonzalez said. "It kind of surprised us all."
Marquis struck out swinging to strand the runner and set the stage for Gonzalez's heroics.
"Evidently I thought he had a good chance of getting something positive to happen," La Russa said. "He's been getting a lot of base hits, and I like a left-hander in that situation. He's a left-hander."
La Russa brought on Ray King (2-2) to pitch the ninth, and Gonzalez lofted a 2-2 pitch just over the right field fence for his 12th home run, but just his second off a left-hander.
"A breaking ball down and away," Gonzalez said. "I just hit it square. For me, with my swing, I don't have to swing hard. I just have to make good, solid contact."
King thought he threw a good pitch.
"If I was out there playing those guys tomorrow, I'd throw the same pitch in the same situation," King said. "Every once in a while you get beat."
Kelly Stinnett gave Arizona its first lead of the series, 1-0, with a leadoff home run in the third.
The Cardinals tied it in the eighth and threatened to get more. Starter Claudio Vargas hit Yadier Molina in the left hand, forcing the St. Louis catcher to leave the game.
Cardinals trainer Barry Weinberg said Molina has a "very small non-displaced fracture of the fifth metacarpal."
"We'll check him tomorrow for pain and swelling," Weinberg said. "We'll treat it just like a bruise, and knowing `Yadie' it's going to be a very, very short time before he returns."
With one out, pinch-runner Hector Luna advanced to third when David Eckstein singled on a hit-and-run play.
Arizona manager Bob Melvin brought in left-hander Armando Almanza to pitch to the left-handed batting Jim Edmonds, then La Russa countered by having the right-handed hitting Albert Pujols pinch hit. Still, Almanza, in his Diamondbacks debut, got Pujols to pop out on one pitch.
Jose Valverde relieved Almanza and gave up an RBI single to Reggie Sanders, then walked Larry Walker to load the bases. Third baseman Troy Glaus kept the game deadlocked by grabbing Scott Rolen's sharp line drive to end the inning.
Vargas, in his fifth start and eighth appearance since being claimed off waivers from Washington, blanked St. Louis on three hits through seven innings. He ended up going 7 1/3, allowing one run, striking out six and walking two.
"He made a ton of great pitches and we couldn't get anything going," La Russa said. "If he doesn't hit the catcher, I'm not sure we score."
Marquis, winless in his last five starts, gave up one run and four hits in eight innings.
After Stinnett's third home run of the season in the third, Vargas singled and went to second on a balk by Marquis. Chad Tracy walked to put runners at first and second with one out.
But Edmonds made a lunging catch of Gonzalez's deep drive to center, then Glaus struck out for the second time of the night, angrily hurling his bat toward the dugout to scattered boos from the crowd.
Edmonds' grab was one of two big defensive plays for St. Louis. Shortstop Eckstein robbed Luis Terrero of a bloop single with a diving catch behind third base in the seventh.
The Cardinals won Wednesday night's game by a 2-1 score.
"With our club, the way we swing, in this ball park, it's shocking to see 2-1 games being played," Walker said, "but it's just good pitching."
In Vargas' previous three starts, all victories, Arizona scored 26 runs. ... Edmonds was shaken up after his big catch but, after a few minutes to recover, stayed in the game. ... Arizona snapped a string of eight straight home losses to the Cardinals.