Tracy had his first two-homer game, and the Diamondbacks beat the Padres 6-1 Sunday to secure a split of the four-game series and move within 5½ games of first-place San Diego in the NL West.
"We had to have that one," Diamondbacks manager Bob Melvin said. "That was a big swing. Five and a half wasn't what we envisioned when we won the first game, but 7½ would have been worse."
Tracy hit a solo home run in the third off Tim Stauffer, then connected for a two-run shot off Chris Hammond in the seventh for a 4-1 lead.
"There is a big difference between winning and losing that game," Tracy said. "A game right now is huge considering how the West looks. We cannot let the Padres get too far ahead."
Tracy, who raised his average to .313, has hit 13 homers, including one on Saturday night in the Diamondbacks' 4-1 loss.
"There are times when guys carry teams and we haven't had that this year," Melvin said. "He carried us today."
Tracy finished the four-game series 8-for-18 with four runs, three home runs, a double and six RBI.
Tracy used one of teammate Luis Gonzalez's 33-ounce bats on Saturday night when he homered off Jake Peavy and used it again Sunday.
"It's a couple of ounces heavier than mine. I think I'll keep on using it," he said.
Brad Halsey (6-7) pitched six strong innings, holding the Padres to one run on five hits. Halsey is 2-0 against San Diego this season with a 1.89 ERA in three starts. Halsey also beat San Diego 5-3 on April 22 at Arizona.
"He shut us down," said Brian Giles, who went 1-for-3 with a walk. "We had guys on base here and there. We never got the big hit. He's been tough on us all year."
Jose Valverde pitched two innings for his second save in three chances.
On Saturday night, Peavy said: "We got a foot on their throats. I hope we can break their backs tomorrow, put some distance between us."
The Diamondbacks didn't forget.
"I guess we got a reprieve," Melvin said.
Tracy laughed and added: "They didn't (win), so I guess they didn't break our backs. We'll be OK if we play like we did in the first game and the last game."
The Diamondbacks took a 1-0 lead in the first inning. Craig Counsell led off with a single and advanced to second on a groundout. He then scored on Troy Glaus' two-out single, the first of his three hits.
Arizona increased its lead to 2-0 in the third on Tracy's solo homer with one out before San Diego scored in the fourth on a sacrifice fly by Ben Johnson.
Stauffer, who came in having won two straight decisions for the first time in 11 career starts, allowed two runs and seven hits in six innings. The rookie struck out two and walked two.
"I thought he did a nice job," San Diego manager Bruce Bochy said. "He gave us a chance to win that ballgame, but we couldn't do much against Halsey."
Counsell walked to lead off the seventh inning against Hammond, who then gave up the two-run homer to Tracy.
"He's deceptive because he throws slow, slower and slowest," Tracy said. "But he hung a changeup and I did what any major league hitter is supposed to do with a hanging changeup."
San Diego threatened in the eighth against Valverde. Giles drew a leadoff walk and went to second on Ramon Hernandez's single. But Valverde struck out Xavier Nady looking on a full-count fastball and then got Greene on a flyout. Pinch-hitter Robert Fick ended the inning with a popup.
Royce Clayton added a two-run single in the ninth to close out the scoring.
Bochy said that RHP Adam Eaton, on the DL with a strained tendon in his right middle finger, received a cortisone shot in his finger on Sunday and will be reevaluated when the swelling goes down in a couple of days. ... Stauffer got hit on his right leg by Luis Terrero's line drive in the sixth inning. Stauffer, who was in obvious pain, finished the inning. ... Glaus got knocked down when he ran into umpire Paul Runge while chasing a foul popup in the fifth inning. Eric Young hit a short popup past third base and Glaus turned to give chase. Glaus, however, ran right into Runge, who failed to move quickly enough to get out of the way. Glaus, who has a left knee tendon strain, fell face first to the ground. Young then popped up on the next pitch to Glaus.