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 the Braves’ hitters in a ninth-inning comeback against the Giants’ closer on 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 in the ninth that lifted Atlanta to a 6-5 win and ended a four-game losing streak.
“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.
Romo (3-3) walked pinch-hitter Evan Gattis, who was replaced by pinch-runner Reed Johnson, with one out. Andrelton Simmons followed with a grounder that skipped past third baseman Joaquin Arias for an error, putting runners on first and second.
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 Arizona, where the Giants were a division rival, took a close 3-2 pitch for a ball to force in the tying run. 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 3-2 pitch, Romo said “It really doesn’t matter what I think. The outcome of the game is already settled.”
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 game-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) struck out Hunter Pence to end the ninth with runners on first and second. Pence drove in two runs.
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.
Upton’s 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. Simmons’ 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. Pence added a run-scoring single.
NOTES: The Braves will wait until after Sunday night’s game to name a second pitcher to join Paul Maholm as the starters in Tuesday’s doubleheader against the Mets. One possibility is rookie LHP Alex Wood, who was working as a starter for Double-A Mississippi before he was called up on May 30 to pitch out of the Braves’ bullpen. ... RHP Brandon Beachy, recovering from 2012 elbow ligament-replacement surgery, had been on target to make his 2013 debut on Tuesday before having tenderness in the elbow. Beachy had a MRI on Saturday and said the test showed he has only inflammation and no structural damage. “I’m just going to get some rest and it will clear up,” Beachy said. “I’m not worried about it at all.” ... The series ends Sunday night when Braves RHP Julio Teheran faces Giants RHP Tim Lincecum.