Gallardo surrendered a tie-breaking two-run single to Neil Walker in the sixth and Milwaukee fell to the Pirates 3-1 on Wednesday night to fall to 2-10 in their last 12 games.
"Obviously we're struggling right now but we've got to get over it," Gallardo said. "We've got to work through it and turn it around as soon as possible."
Gallardo (3-3) has toyed with the Pirates during his career and had won his last seven decisions against Pittsburgh. Though he was solid, giving up two runs on three hits in six innings, walking four and striking out four, he was outdueled by Wandy Rodriguez.
The veteran lefthander shut down the Brewers over seven strong innings, getting out of an early jam in the fourth while giving up only a solo homer to Rickie Weeks in the seventh. Rodriguez (4-2), scattered six hits, walking one and striking out five.
"He pitched a good game," Milwaukee's Carlos Gomez said of Rodriguez. "He had his curveball working and he pitched inside really well. We have to start scoring some runs, though."
Pittsburgh managed just one hit through the first six innings before Starling Marte doubled to center leading off the sixth. Andrew McCutchen and Gaby Sanchez worked one out walks to load the bases and Walker took the first pitch he saw and laced it to center to score Marte and McCutchen.
"The pitch was off the plate and below the knees," Gallardo said. "Sometimes, you've got to tip your cap to the hitter. I threw it where I wanted to throw."
Walker, playing his third game since returning from a stint on the disabled list with a hand injury, didn't waste an opportunity to get the better of Gallardo.
"He has to come to you," Walker said. "He has to throw strikes and if you stay in your own approach and don't go chasing pitchers pitches and more often than not you're going to at least hit a barrel. "
Pittsburgh's triumph, coupled with a 4-3 victory in 12 innings on Tuesday, gave the Pirates consecutive victories over the Brewers for the first time since Aug. 18-19, 2009. Milwaukee has dominated the Pirates over the last six years, winning 73 percent of the meetings between the two clubs and knocked Rodriguez around during his last start against the Brewers two weeks ago.
The left-hander was rocked for seven runs in 4 2-3 innings of an eventual 10-4 loss on April 29.
Things were decidedly smoother this time around.
Working both sides of the plate, Rodriguez kept the Brewers off balance and found a way to get out of trouble. Milwaukee put runners in scoring position in each of the first four innings but had nothing to show for it.
No missed opportunity loomed larger than the one the Brewers created in the fourth when Jonathan Lucroy led off with a triple to right. Rodriguez induced Carlos Gomez and Weeks to hit harmless infield flies before Alex Gonzalez rolled a routine grounder to shortstop to end the threat. The Brewers went 0 for 6 with runners in scoring position.
"We had a great opportunity after (Lucroy's) triple but we've got to swing it better," Milwaukee manager Ron Roenicke said. "It was a well-played game, a well-pitched game but we didn't hit."
Weeks drew the Brewers within a run in the seventh with a homer to the bleachers in left field off Rodriguez but baseball's best one-two punch out of the bullpen shut the door.
Set-up man Mark Melancon retired the Brewers in order in the eighth and Jason Grilli did the same in the ninth for his 16th save as Pittsburgh remained undefeated (17-0) when leading after seven innings.
The Pirates gave Grilli a little extra cushion in the eighth when McCutchen scored from third after Weeks threw wide of first after making a diving stop on a grounder by Walker.
NOTES: Pittsburgh recalled INF Jordy Mercer on Wednesday after placing John McDonald on the 15-day disabled list with a bad back. Mercer started at shortstop and went 1 for 2 ... The Brewers plan to call up veteran reliever Francisco Rodriguez on Thursday. The 31-year-old Rodriguez signed a minor-league deal with the Brewers in April. The four-time All-Star went 2-7 with a 4.38 ERA in 78 games with Milwaukee in 2012 ... ... Umpire Fieldin Culbreth worked at third base on Wednesday night. He left Tuesday night's game after being struck in the neck with a ball ... The series concludes on Thursday. Hiram Burgos (1-1, 6.86 ERA) starts for the Brewers against Pittsburgh's Francisco Liriano (1-0, 1.69).