DENVER -- With their homestand ending and the season possibly slipping away, the Colorado Rockies' offense came to life and bailed out the bullpen.
Michael Cuddyer, Dexter Fowler and Corey Dickerson also homered for the Rockies, who salvaged a split of their 10-game homestand.
"We would have liked for the homestand to be a little better than it was, but we had to win today," manager Walt Weiss said. "That was all we can control. We're pitching well and our offense is showing signs of life."
Yuniesky Betancourt and Norichika Aoki homered and Carlos Gomez had two hits and scored twice for the Brewers.
The Rockies had hoped to stay in the thick of the NL West race when they resumed after the All-Star break against the three worst teams in the NL. Instead, they lost three of four to Miami and were in danger of losing the series to Milwaukee before coming back against John Axford (4-4).
Two of their best hitters gave them a lift.
Trailing 5-4, Tulowitzki led off the eighth with a double down the third base line and scored on Cuddyer's double down the first base line.
"I don't think Cuddy thought it was fair when he hit it," Axford said. "He stayed in the box at first and it shot down the line. Perfectly placed."
One out later, Cuddyer moved to third on a wild pitch before Nolan Arenado, who popped out with Todd Helton on third in the fourth, hit a go-ahead single.
"Getting a guy on third gives you a little more confidence," Arenado said. "I was happy to get the guy in finally from third."
Rex Brothers got the final three outs for his seventh save.
The win gives the Rockies some momentum heading into a three-city, 10-game East Coast swing that starts against the NL East-leading Atlanta Braves on Monday. Colorado is six games behind the surging Dodgers and needs a successful road trip to stay in the playoff picture.
"We know we're a talented team, we know we can compete with anyone in the league," Cuddyer said. "We've just got to be consistent. Hopefully today was a stepping stone for that."
The Brewers took the lead in the eighth when Gomez doubled and Betancourt homered off reliever Matt Belisle (5-5).
"I put it on the tee for him. As soon as it left my hand I knew it was not going to be good," Belisle said. "That ball got away from me. I tried to do a little too much and think of the outcome instead of focusing on the pitch."
It was one of six home runs hit in the thin air at Coors Field.
The Rockies trailed 3-1 when Dickerson led off the sixth with his first career homer. One out later, Cuddyer hit his 17th to right to tie it.
"I was happy with what I did today, but in the sixth I have to make better pitches," starter Donovan Hand said.
Fowler's two-out homer off reliever Michael Gonzalez in the seventh gave Colorado a 4-3 lead. It was his 12th of the season.
Jhoulys Chacin was in line for the win before Betancourt's homer in the eighth. Chacin allowed three runs on eight hits and struck out four in seven innings.
Tulowitzki gave the Rockies a 1-0 lead in the first with his 19th home run of the season. The Brewers tied it in the second on a bases-loaded infield single by Jeff Bianchi.
Aoki made it 2-1 in the third with his sixth homer, and Bianchi gave the Brewers a two-run cushion with an RBI single in the fourth.
Hand went six innings, his longest outing of the season in just his fifth start. He allowed three runs on eight hits and didn't walk a batter.
"I liked Donnie Hand's effort," Brewers manager Ron Roenicke said. "He's disappointed in a couple of pitches, but he has done a nice job."
Aoki's home run was the 100th of his professional career and 16th in the major leagues. ... Brewers SS Jean Segura was given the day off after getting hit in the right forearm with a pitch Saturday. Roenicke said Segura is fine and he just kept him out for rest. ... Rockies OF Carlos Gonzalez (sprained right middle finger) was out of the lineup for the third straight day. ... Colorado LHP Jorge De La Rosa (10-5, 2.97 ERA) will start Monday in Atlanta. ... Milwaukee RHP Kyle Lohse (7-7, 3.37) will open a four-game series at the Cubs on Monday.