MILWAUKEE -- Ron Roenicke could be forgiven if he had to give the scoreboard a second glance late Wednesday night.

After the Brewers headed to extra innings by blowing late leads the previous two nights, the Milwaukee manager was able to breathe a sigh of relief when his team put four on the board in the eighth inning -- including a three-run home run by left fielder Khris Davis -- in an 8-3 victory over the Baltimore Orioles at Miller Park.

"To add on late like that ... that's huge," Roenicke said. "We keep waiting for one of those (innings), and we got it."

Milwaukee led 4-3 when center fielder Carlos Gomez led off the eighth with a double off Orioles right-hander Brad Brach. A single by infielder Mark Reynolds put Gomez on third and brought lefty Brian Matusz in to face Brewers pinch hitter Rickie Weeks.

Weeks made it 5-3 on a base hit to left. When Matusz left a 1-0 changeup over the plate, Davis sent it just inside the foul pole in the left field corner for his ninth homer of the season.

"It was huge," Davis said. "They had the momentum going, and for us to deliver a big blow like that puts a hurting on that. It was a good win."

Orioles manager Buck Showalter said, "We let that eighth inning get away from us. I liked our chances there if we could have held it to one run."

Davis previously walked and singled, extending his hitting streak to seven games. With the home run, he finished the three-game set against Baltimore 7-for-11 with home runs in each game and five RBIs.

During his hitting streak, Davis is 12-for-27 with four home runs and seven RBIs.

The late offensive burst gave right-hander Yovani Gallardo his first victory since April 6.

Gallardo (3-3) gave up three runs on four hits and five walks while striking out five to snap a three-game losing streak.

"This is fun," said Gallardo, who delivered a pinch-hit, walk-off double in the 10th inning Tuesday night. "The last two games -- it was a good way to get a victory before the off day. Guys can enjoy the off day tomorrow and get back at it on Friday."

Orioles left fielder Nelson Cruz hit two home runs -- both off Gallardo -- giving him 12 for the month and a major-league-leading 19 for the season. It wasn't enough to help Baltimore starter Bud Norris (3-5), who allowed four runs on five hits and three walks over six innings.

"My pitch count did skyrocket pretty quick there in the first couple of innings, but I settled down from there," Norris said. "I started making some adjustments, and to get through six was pretty nice."

Baltimore got within a run in the seventh when right fielder Nick Markakis -- who chased Gallardo from the game with a two-out double -- scored on an RBI single by third baseman Manny Machado against Brewers right-hander Brandon Kintzler.

Kintzler put two on before giving way to lefty Will Smith. After a throwing error that put both runners in scoring position, Smith struck out first baseman Chris Davis to end the inning, then struck out three of four batters in the eighth.

Gomez made Norris pay for back-to-back, one-out walks by hitting an RBI single in the first inning.

Cruz tied the game at 1-1 in the second inning with a shot to right off Gallardo.

Left fielder Ryan Braun hit a two-run double in the second that gave Milwaukee a 3-1 lead. Second baseman Scooter Gennett's third-inning sacrifice fly scored Gomez and put the Brewers up by three.

Gallardo walked the bases loaded with two outs in the fourth, but Baltimore could not take advantage of the opportunity. Second baseman Jonathan Schoop grounded out to second to end the inning.

NOTES: Baltimore outrighted RHP Evan Meek to Triple-A Norfolk and traded minor league C Johnny Monell to the Los Angeles Dodgers for cash considerations. ... Seldom-used LHP Wei-Chung Wang, a 21-year-old Rule 5 selection, threw a simulated game on Wednesday as the Brewers try to give him a more consistent workload.