The Cubs, who had lost 19 of their previous 21 games at Miller Park entering Wednesday, made Gallardo labor for every out of a 96-pitch, four-inning clunker. Meanwhile, Scott Feldman worked around Aramis Ramirez's big day and Kevin Gregg escaped a scary ninth to help the Cubs win, 5-4, and snap a nine-game losing streak in Milwaukee.
The Cubs led, 5-3, with Gregg coming on to close the ninth inning, but Juan Francisco led off with his eighth home run and Rickie Weeks followed with a double. After Logan Schafer bunted Weeks to third, the Brewers faced a familiar situation: a runner on third with less than two out.
Yuniesky Betancourt, who pinch-hit in the seventh and stayed in the game to play left field, hit a sharp grounder on Gregg's first offering right to Cubs third baseman Luis Valbuena. Weeks was moving on contact and easily out at home plate, despite colliding with catcher Welington Castillo.
"That's what he's supposed to do, going on contact," Brewers manager Ron Roenicke said. "[Valbuena] made a nice play getting it quick and getting rid of it. But you hope it's chopped more in-between them so they have to go over a couple steps. I don't know if it's lucky or what, but we're hitting ground balls right at people."
The play would have been forgotten if Scooter Gennett's deep fly ball two pitches later carried a bit further. Instead, it was caught by Cubs right fielder Nate Schierholtz just in front of the wall on the right-field warning track to end the game.
"I was just thinking, 'Maybe a little bit more cereal or Wheaties and I might've been able to get it out,'" said Gennett, who approached second base with a bit of a smile while watching his ball come up just short. "It would've been nice to get it out and get the win."
"When that ball left the bat, I ain't lying, I thought it was a homer, especially in this ballpark," Cubs manager Dale Sveum said. "I like that kid. He's going to be a good Major League player. He came over to big league camp when I was over there. I've seen him hit some bombs. That little guy can hit the ball a long way."
Gennett will be hitting in the Minor Leagues for a while as the Brewers optioned him to Triple-A Nashville following the game. The team made the move to allow Gennett more playing time and at-bats after Weeks won back his second base job with a hot June.
Ramirez notched his 2,000th career hit in the second, a first-pitch home run off Feldman into the Brewers' bullpen. The third baseman became the 15th active player to reach 2,000 career hits and was the first player to do it with a home run since Placido Polanco did so with the Phillies on May 14, 2012.
It was just Ramirez's second home run in his last 106 at-bats. He added an RBI single up the middle in the sixth inning.
Control issues and two Milwaukee errors led to a high pitch count early for Gallardo, who exited after four innings, trailing, 5-2. The right-hander gave up two earned runs in the second inning, ending his 22-innings streak without an earned run allowed.
Gallardo left the game after the fourth having thrown 96 pitches, 59 for strikes, allowing eight hits, five runs -- three earned -- and walking four while striking out five.
Feldman ended the fourth with just 51 pitches and lasted six innings, allowing six hits and three earned runs while walking none and striking out three. He threw 81 pitches, 54 for strikes.
"Tough outing for him. Command, just off," Roenicke said of Gallardo. "He made some good pitches but he didn't have the consistency. He's got good stuff. He should be able to get hitters out easier than what he did tonight."
"I was leaving the ball up in the zone," Gallardo said. "When the ball's up, you're going to get hit no matter who it is."
The Brewers committed two errors, a dropped fly ball from Caleb Gindl in left field and a bobbled grounder from Weeks at second base. They had a couple other miscues: a misplayed Anthony Rizzo double to left by Gindl and miscommunication between Ramirez and Jean Segura on a chopper that was ruled an infield single for Brian Bogusevic.
"We also didn't play very good behind [Gallardo]," Roenicke said. "We missed a couple plays in left field and a play at second base, and it cost him pitches. You get more baserunners and you throw more pitches, and all of a sudden you're out of the ballgame."
The Cubs went up, 2-0, with RBI hits from Darwin Barney and Valbuena in the second inning. After Ramirez's homer and a single tally from each side in the third, Weeks' miscue at second base opened the door for two Chicago runs in the fourth.
Weeks bobbled a Valbuena ground ball to his right with one out and threw late to first base for an error. After a Starlin Castro single and Schierholtz flyout, Ryan Sweeney walked to load the bases with two out. Rizzo followed a coaching visit to the mound with a sharp grounder up the middle to score Valbuena and Castro for a 5-2 Cubs lead.
The early deficit could have been worse if not for a nice play by Schafer that covered up a bad one by Gindl in the third. Gindl dropped a Bogusevic fly ball right at him in left field to set the Cubs up with runners on second and third and nobody out. After Castillo grounded out, Schafer ranged into shallow right-center field to grab Barney's pop fly and fired a bullet to catcher Jonathan Lucroy, who blocked the plate and tagged out a sliding Rizzo to end the threat.
Sweeney hit a solo homer off Gallardo for Chicago's third run in the third inning.
Norichika Aoki had two hits and two stolen bases, and Weeks extended his hitting streak to 10 games.
Kevin Massoth is an associate reporter for MLB.com.
This story was not subject to the approval of Major League Baseball or its clubs.