It was Gallo's second homer in two games and 15th of the season. Max Kepler had two hits for Minnesota.
Ober (5-4) allowed just a pair of singles, while striking out eight batters without a walk and hitting one batter. It was the second time this season that Ober went seven innings without giving up a run.
Griffin Jax worked a scoreless eighth and Jhoan Duran pitched an eventful ninth for his 12th save.
Adley Rutschman reached via an infield hit with one out in the ninth. Pinch runner Jorge Mateo then stole second. Mateo was originally called out, but Baltimore challenged, and the call was overturned. Anthony Santander followed with a drive down the rightfield line, where right fielder Kepler made a diving catch in foul territory, and Ryan O'Hearn grounded out.
The Orioles, losers of four straight games for the first time this season, have managed one run and seven hits in the first two games of the series
Baltimore starter Kyle Bradish (4-4) nearly matched Ober, giving up one run on seven hits over six innings. He struck out seven and walked one.
After Gallo walked, the Twins had runners on first and second with two outs in the second, but Bradish struck out Michael A. Taylor
In the Minnesota third, Carlos Correa led off with a single. Byron Buxton hit a drive to left, but Austin Hays raced to his right and made a diving catch. Alex Kirilloff followed with a single, but Bradish retired Royce Lewis, who appeared to grab at his side while running to first and left the game.
Gallo broke the scoreless tie when he homered to right center with two outs in the fourth.
Kyle Farmer singled and went to second on a wild pitch with one out in the Minnesota sixth, but Bradish pitched out of trouble.
Santander singled leading off the Baltimore seventh, but Ober retired the next three batters without allowing Santander to advance.
--Field Level Media