Gallardo (8-8) baffled the Marlins, who mustered only five hits and a pair of walks. Gallardo recorded five strikeouts.
After Ryan Braun's two-run double in the first inning gave Milwaukee a quick lead, Lucroy pounded a solo homer in the next frame for a 3-0 advantage.
He also provided an RBI double in the fourth, capping a three-run Brewers outburst.
Rickie Weeks homered and Norichika Aoki chipped in two hits, including a run-scoring single, as Milwaukee claimed a third straight victory.
Miami's Nathan Eovaldi (2-1) took the loss, giving up six runs on 10 hits over four innings.