ATLANTA -- Freddie Freeman knew Brian Wilson had to throw a strike. He correctly guessed it'd come with heat.
Freeman capped a three-run rally against Wilson, San Francisco's star closer, in the ninth with a two-run, bases-loaded single to lift the Atlanta Braves to a 5-4 win over the Giants on Monday night.
"I knew I was going to get a pitch to hit," Freeman said.
"He's got to throw a strike or walk in the tying run. ... I got a pitch to hit and got it up the middle."
Wilson (6-4) couldn't hold a 4-2 lead. He gave up three hits and two walks in the ninth for his fifth blown save in 40 chances.
The Braves rallied in the Giants' first return to Atlanta since beating Atlanta in the 2010 NL division series.
The Braves, a distant second in the NL East, stretched their lead to five games over San Francisco in the NL wild-card race. The Giants began the night two games behind first-place Arizona in the NL West.
"We're right in the thick of things," said Giants manager Bruce Bochy. "This is August. We've got time to make this up."
The bearded Wilson was greeted with loud boos as he jogged to the mound.
Speedy Jose Constanza led off the inning with an infield hit before Wilson walked pinch-hitter Eric Hinske, who was replaced by pinch-runner Julio Lugo.
Michael Bourn's sacrifice bunt moved the runners to second and third before Martin Prado delivered a run-scoring single to left, trimming the Giants' lead to 4-3 and moving Lugo to third.
Wilson walked Brian McCann on four pitches to load the bases before striking out Dan Uggla to bring Freeman to the plate.
Freeman worked the count full and then waited on a fastball.
Freeman said he expected Wilson to throw "either a two-seamer or a cutter." He said he got the two-seamer.
The rookie first baseman lined the 3-2 pitch over the middle to drive in Lugo and Prado. Braves players stormed out of their dugout to celebrate around Freeman near second base.
"I'm not worried about what a hitter can do," Wilson said. "I pitch to my strengths. They hit them where we weren't.
"I lost the game. I blew it."
Wilson was not available on Sunday at Florida due to a sore back. He said his back was not an issue against the Braves.
After the game, Freeman inspected the damage from the celebration. He said a toe that was stepped on by a teammate was numb. An elbow also was sore, or at least that was his best guess.
"We'll see in about two hours when the adrenalin rubs off," he said with a smile.
Nate Schierholtz snapped a 2-2 tie with his homer to right in the sixth. Mike Fontenot, in the game when Pablo Sandoval left with a foot injury in the first inning, added an eighth-inning homer off Tim Hudson.
Cristhian Martinez (1-2) pitched a perfect ninth after Tim Hudson gave up four runs, two earned, in eight innings.
Uggla had one hit, a fifth-inning double, one day after the end of his 33-game hitting streak, the longest in Atlanta Braves history.
McCann hit a first-inning homer for Atlanta and Constanza had a run-scoring single in the second.
Madison Bumgarner gave up two runs on eight hits and two walks in seven innings.
The Giants scored two unearned runs without a hit off Hudson in the fourth. Bourn dropped Aubrey Huff's liner in center field for an error. Hudson walked Schierholtz and hit Brandon Belt with a pitch to load the bases. Fly balls by Orlando Cabrera and Eli Whiteside drove in the runs.
Sandoval left the game in the first inning after fouling a ball off his right foot. X-rays were negative.
Sandoval fell to the ground in the batter's box after the foul ball hit him below his shin guard. He completed the at-bat and reached first base on a fielder's choice.
Fontenot replaced Sandoval at third base in the bottom of the first inning.
The Braves were without third baseman Chipper Jones, who hurt his left knee while running to first base as a pinch-hitter against the Cubs on Sunday.
Jones said he had an MRI on the knee on Monday and was relieved the test did not reveal a significant injury. He said he needed pain medication to sleep on Sunday night.
Jones tore the anterior cruciate ligament in his left knee on Aug. 10, 2010 and had season-ending reconstructive surgery four days later.