Tracy's pinch-hit knock gave Gio Gonzalez his second win of the season after the right-hander pitched six shutout innings, allowing just two hits and two walks while striking out six.
Xavier Nady led off the top of the seventh with a double to left field and Wilson Ramos followed with a walk. After Steve Lombardozzi sacrificed the runners to second and third, Tracy singled up the middle past the drawn-in infield to make the score 2-0.
The Padres got one run back in the bottom of the inning. Cameron Maybin led off the inning with a walk and Orlando Hudson singled off Craig Stammen. Tyler Clippard came in to put out the fire and struck out Yonder Alonso before pinch-hitter Andy Parrino singled to center. Jayson Werth bobbled the ball as he went to field it, allowing Maybin to score. But Clippard retired Mark Kotsay on a pop-up and got Chris Denorfia to ground to third to end the inning.
Washington tacked on an insurance run in the ninth as Wilson Ramos advanced to third when San Diego right fielder Will Venable lost the Nats catcher's well-hit ball in the lights. Ramos came around to score on pinch-hitter Rick Ankiel's broken-bat single to make the score 3-1.
Henry Rodriguez retired the side in order in the bottom of the ninth to secure Washington's 13th win of the season.