Ramirez's 15 homer of the season came off Francisco Cordero, who blew a save chance for the third time in 30 chances.
The Brewers did all their scoring in the opening frame against Rich Hill with Kevin Mench's three-run homer the big blow.
Bob Howry pitched an inning of relief and is 5-and-4. Cordero dropped to 0-and-2.
Brewers rookie starter Yovanni Gallardo ends up with a no-decision after limiting the Cubs to two runs on five hits over six innings with seven strikeouts.
The Cubs reach the .500 mark at 39-and-39 and trail first-place Milwaukee by six and a-half games in the N-L Central.