ATLANTA — Justin Upton has seen a lot of Sergio Romo and knew what pitches to look for — and what pitch to take.
Freddie Freeman didn't have that advantage, so he said he was just looking for anything to hit.
The strategies worked for each of those Atlanta Braves hitters in a ninth-inning comeback against the Giants' closer Saturday.
Upton drew a bases-loaded walk from Romo to force in the tying run and Freeman followed with a line-drive single off the closer to cap a two-run rally that lifted Atlanta to a 6-5 win over San Francisco.
"It's just nice to be able to come back," Freeman said. "We battled, and to come back and get a win makes it nice."
B.J. Upton hit two homers off Chad Gaudin, but the Braves trailed 5-4 entering the ninth.
With one out, Romo (3-3) walked pinch-hitter Evan Gattis, who was replaced by pinch-runner Reed Johnson. Andrelton Simmons followed with a grounder that skipped past third baseman Joaquin Arias for an error, putting runners on second and first.
Jason Heyward followed with a liner that fell in front of left fielder Andres Torres, loading the bases.
Justin Upton, who came to Atlanta in an offseason trade from Giants division rival Arizona, took a close 3-2 pitch for a ball to make it 5-all. The pitch, which had Upton backing away, was close to the inside part of the plate. Romo took a few steps toward the plate to express his disagreement.
"It was a close pitch but I obviously think it's a ball," Upton said. "Pitchers want that pitch. It went my way."
Added Upton: "I've seen him a few times, so I know what to look for."
Asked about the full-count pitch, Romo said, "It really doesn't matter what I think. The outcome of the game is already settled."
Romo said he didn't let the walk affect his concentration against Freeman.
"I was fine," he said. "I had to focus. We were still in the game. Although they tied the game, we still had an opportunity to keep playing. You've got to dig down deep right there and stay focused."
Romo threw Freeman two sliders -- one ball and one strike -- before trying to sneak a fastball past the big first baseman. The left-handed hitting Freeman turned on the pitch, lining the winning single to right field.
"I just put my foot down and swung when I saw the ball," Freeman said. "I don't look for anything. I just put my foot down and swing and hope for the best."
Romo took his third blown save in 19 opportunities.
Braves closer Craig Kimbrel (2-1) got the win. He struck out Hunter Pence, who had driven in two runs, to end the ninth with runners on second and first.
Gaudin gave up four runs on eight hits in five-plus innings.
Pence had a run-scoring single in the Giants' three-run third inning and a sacrifice fly in a two-run fifth. The Giants had won three straight.
Braves starter Mike Minor gave up five runs, four earned, on seven hits and a walk in six innings.
San Francisco relievers Jean Machi, Javier Lopez and Jeremy Affeldt combined for three scoreless innings before Romo gave up two runs, one earned, on two hits and two walks.
B.J. Upton's long second-inning homer landed about halfway up the lower section of the left-field seats. His two-run homer to center field in the sixth drove in Brian McCann, who doubled. The homer cut San Francisco's lead to 5-4 and knocked Gaudin out of the game.
Simmons committed two errors after beginning the day with only four miscues for the season. His fielding error on Tony Abreu's grounder led to an unearned run in the fifth. Buster Posey followed with a run-scoring double that drove in Torres. Abreu scored on Pence's fly ball to right field.
Simmons made a wild throw after fielding an infield single by Juan Perez to open the sixth, but Minor pitched out of the jam.
The Giants took the lead in the third inning with three runs on four hits, including back-to-back RBI doubles by Torres and Abreu, who had three hits.