Gallardo was knocked around for six runs and the NL Central-leading Brewers committed three errors Friday night in an 8-3 loss to the Pittsburgh Pirates.
"We played poor on defense and didn't pitch well," manager Ron Roenicke said. "We didn't get a lot of hits off (Jeff) Locke, but we had a lot of baserunners out there. We just didn't get the big hit when we needed it."
Gallardo (8-7) lasted just five innings, allowing eight hits and three walks.
"I was not throwing balls where I wanted to, and obviously they were up in the zone," he said. "Those kind of things can't happen."
Said Roenicke: "Yovani didn't throw the ball well, but we never really gave him a chance to get into a rhythm."
"The first five runs they scored, we gave to them. You can't do that," he said,
Josh Harrison homered, doubled, single and drove in a career-high five runs for Pittsburgh, which had lost nine of 12 going into this series.
With this win, Pittsburgh now trails Milwaukee by five games.
Locke (5-3) pitched six innings, giving up two runs and two hits. He walked six, but was able to strand five runners.
Ryan Braun's two-run homer in the first inning gave Milwaukee a 2-0 lead. It was his 16th home run of the season, but just his second since July 22 as he's been slowed by a sore thumb.
Pittsburgh came right back in the second for 3-2 lead, taking advantage of Gallardo's wildness as he issued two straight walk after an error by third baseman Aramis Ramirez. Jody Mercer hit a sacrifice fly and Harrison lined a two-run double.
The Pirates made it 4-2 on Neil Walker's RBI triple in the third and Harrison singled home a run in the fourth.
Andrew McCutchen hit his 18th home run of the season leading off the fifth. It was his third game since coming off the disabled list because of a rib fracture and it was his first home run since he hit two against Cincinnati on July 12.
Harrison hit a two-run homer in the eighth.