Rodriguez connected off Giants reliever George Kontos with two outs in the seventh innings to give the Yankees a decisive lead which saw them go on to win the game.
The Yankees still have work to do to make up the ground needed to secure a Wild Card berth, but Rodriguez's efforts gave them a much-needed boost.
Elsewhere, Boston Red Sox clinched their first American League East title since 2007 with a 6-3 win over Toronto Blue Jays while Atlanta Braves cut their magic number to one despite wasting a four-run lead as they beat Chicago Cubs 9-5.
Cincinnati edged out Pittsburgh Pirates 6-5 after Jordy Mercer's error helped the Reds tie in the ninth before Joey Votto's home run lifted Cincy into a tie with the Pirates for the Wild Card lead and second place in the National League Central.
Cleveland Indians won a rain-shortened game 2-1 against Houston Astros to ensure they remain no more than a half-game out of the American League Wild Card race.
Meanwhile, Jordan Zimmermann threw a two-hit shutout with nine strikeouts for Washington Nationals as they remained five games behind the Reds for the second Wild Card spot with a 8-0 win over Miami Marlins.
In the other games, New York Mets beat Philadelphia Phillies 6-4 and Detroit Tigers cut their division-clinching magic number to three with a 12-5 win over Chicago White Sox.
Colorado Rockies beat Arizona Diamondbacks 9-4 while St Louis Cardinals overcome Aramis Ramirez's five-RBI night and another ninth-innings implosion to beat Milwaukee Brewers 7-6 to extend their division lead.
Kansas City Royals also had a good night as they cut their Wild Card deficit behind Texas Rangers with a 2-1 win at Kauffman Stadium.
Oakland Athletics thrashed Minnesota Twins 11-0 at O.co Coliseum while San Diego Padres beat Los Angeles Dodgers 2-0.
There was a thrilling and long finish to the clash between the Tampa Bay Rays and the Baltimore Orioles as the match went to the 18th inning, with the Rays shading it 5-4.
The Seattle Mariners and the Los Angeles Angels also went long, with LA winning 3-2 in the 11th.