Gonsolsin (15–1) matched the Astros’ Justin Verlander for the major league lead in wins. Los Angeles is 21–5 since the All-Star break and has the majors’ best record at 81–35.
Craig Kimbrel, who blew a save in the Brewers’ 5–4 win in 11 innings on Tuesday night, allowed two baserunners in the ninth but escaped for his 21st save.
Milwaukee fell three games behind first-place St. Louis in the NL Central.
Eric Lauer (8–5) pitched seven solid innings for the Brewers, allowing four hits in seven innings, including the two homers. He had been 6–0 with a 2.56 ERA in nine career starts against the Dodgers.
Gonsolin was dominant in his first career start against Milwaukee. He gave up two hits while walking one batter and tying his season high with eight strikeouts.
The All-Star right-hander retired the first nine Brewers, throwing 28 of his 37 pitches for strikes in the first three innings.
Gonsolin walked Willy Adames in the fourth and allowed one-out singles in the fifth and sixth.
Christian Yelich had an RBI single off reliever Caleb Ferguson in the eighth.
Barnes opened the scoring when he hit the first pitch of the sixth inning into the Brewers’ bullpen for his fifth home run. Barnes, reinstated from the family emergency list Tuesday, hadn’t played since August 6 and hadn’t homered since May 21.
Muncy went deep in the seventh.
Dodgers: Reinstated IF Edwin Ríos from the 60-day IL (right hamstring strain) and optioned him to Triple-A Oklahoma City.
Brewers: RHP Trevor Rosenthal (left hamstring strain) began a rehab assignment at Triple-A Nashville, pitching one scoreless inning.
RHP Trevor Kelley was recalled from Nashville and RHP Jason Alexander was optioned there.
The four-game series ends Thursday with Dodgers LHP Andrew Heaney (1–0, 1.16 ERA) facing Brewers RHP Corbin Burnes (8–5, 2.39).
Heaney left his last start Saturday after three innings with a left arm contusion after getting hit with a line drive. Burnes, the NL Cy Young Award winner, leads the league in strikeouts (181).