Milwaukee blew a 6-3 lead in the top of the seventh when Jose Bautista blasted a three-run shot, his 20th homer of the season, off Kameron Low (4-2).
The Brewers came right back in the bottom of the frame when Ramirez launched a liner down the left field line off Robert Coello (0-1) that hit off the left field wall. It was initially ruled a foul ball, but Brewers Manager Ron Roenicke argued the ball hit actually hit some inbounds padding.
After a lengthy video review, umpires determined the ball struck the padding and the call was reversed.
Ramirez finished 3-for-3 with three RBI and Rickie Weeks knocked in a pair of runs for Milwaukee, which took the opener of a three-game series.
Brett Lawrie and Edwin Encarnacion went deep for the Blue Jays.