Burnes (1-0) gave up three hits and walked one as the Brewers bounced back after dropping six of their previous eight games. They were swept in a three-game series at Pittsburgh last weekend.
''Today I think definitely was the best I've commanded the baseball,'' Burnes said. ''All four or five pitches, I was able to throw them where I wanted to. I made very few mistakes tonight.''
Gyorko hit solo shots in the first and seventh innings for his sixth career multihomer game. His last one came against the Brewers on May 1, 2017, when he was playing for the St. Louis Cardinals.
Ryan Braun and Jacob Nottingham also homered for the Brewers. JT Riddle connected in the seventh for Pittsburgh.
Braun hit a three-run shot to left in the third on a 3-2 pitch from left-hander Derek Holland. The 2011 NL MVP joined Albert Pujols, Miguel Cabrera and Robinson Cano as the only active players with at least 800 extra-base hits.
The only player to collect more extra-base hits for the Brewers is Hall of Famer Robin Yount with 960 from 1974-93.
''He's been a guy that's absolutely hammered left-handed pitching,'' Brewers manager Craig Counsell said. ''That's been a trademark. ... When I remember the prime of Ryan's career - I'm getting nostalgic with Ryan right now - this is what he would do. If there was a left-handed starter in the game, he was going to deliver a big hit. It's cool to see it tonight.''
Braun said he hoped this game could spark another late surge for the Brewers. The team is seeking its third straight playoff berth but is only 14-17 after Friday's victory.
''We had a really good hitters' meeting today,'' Braun said. ''We kind of viewed today as the start of our September. We've been very successful obviously (in September) the last few years. We've been really able to flip that switch and be at our best down the stretch. For us, I think we recognize that starts today.''
Holland (1-2) faced Milwaukee for the third time this season. In his first two starts against the Brewers, Holland allowed a total of three runs over 10 2/3 innings.
He wasn't nearly as effective this time. Holland struck out eight, but gave up eight runs, six hits and four walks over five innings.
Gyorko gave the Brewers a rare early lead with a two-out drive just inside the left-field foul pole in the first. The Brewers had been outscored 17-3 in the first inning before Friday.
After Braun's blast extended the lead to 4-0, Nottingham crushed a 0-2 pitch to left-center in the fourth for his second career homer. Nottingham had been called up earlier in the day to replace catcher Manny Pina, who went on the injured list with torn meniscus in his right knee.
Holland also gave up a two-run double to Mark Mathias with two outs in the fifth.
''We gave up eight (runs) with two outs, and seven with two outs and two strikes,'' Pirates manager Derek Shelton said. ''We didn't finish at-bats. (Holland) did a good job getting to two strikes and then left balls in the middle of the plate, and they hit them hard and obviously hit some of them out of the ballpark.''
Riddle homered against David Phelps in the seventh, but Pittsburgh finished with just four hits.
The Brewers released utilityman Brock Holt and designated reliever Justin Grimm for assignment. Holt had been designated for assignment last week.
FAREWELL TO DYSON
Shelton had some nice parting words for outfielder Jarrod Dyson, who was traded to the Chicago White Sox for international signing bonus pool money. Shelton called Dyson an ''unbelievable teammate'' and credited the veteran for assisting in former shortstop Cole Tucker's move to the outfield.
''One of the things he told Tuck is you have to be able to embrace opportunities,'' Shelton said.
Brewers: Pina will miss at least the rest of the regular season. He hurt his knee while sliding back to first on a pick-off attempt Thursday. ''When I touched the base, I knew right away that something happened with my knee,'' Pina said. ''I left the game and didn't feel too much pain after the game, but when I was back in my apartment trying to sleep, it was very painful.'' Counsell said Pina would undergo surgery but might be available for the postseason if Milwaukee gets there.
The four-game series continues Saturday with JT Brubaker (0-0, 4.80 ERA) pitching for the Pirates and Brett Anderson (2-2, 3.52) starting for the Brewers.
Follow Steve Megargee on Twitter: https://twitter.com/stevemegargee
More AP baseball: https://apnews.com/MLB and https://twitter.com/AP-Sports
Copyright 2020 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.