Gardner connected with two outs in the ninth inning to seal the Yankees' first series win in more than a month. Alfonso Soriano and Alex Rodriguez also homered - the former marking his career 2,000th hit and the latter pulling within 12 home runs of tying Willie Mays on the all-time list.
The AL West-leading Texas Rangers extended their winning streak to seven games with a 6-1 success against Houston, Martin Perez limiting the Astros to four hits and two walks while striking out eight in pitching his first complete game.
James Shields allowed three runs and seven hits over seven innings and Alex Gordon went deep in the Kansas City Royals 4-3 win over the Boston Red Sox.
In other American League play, Alberto Callaspo's go-ahead two-run double in the eighth inning helped the Oakland Athletics topple the Toronto Blue Jays 4-3, Kevin Correia threw down seven shutout innings as the Minnesota Twins overcame the Chicago White Sox 5-2 and Michael Bourn hit the tie-breaking single in the seventh as the Cleveland Indians squeezed past the Los Angeles Angels 6-5.
The National League East-leading Atlanta Braves, whose 14-game winning run was ended by Miami on Saturday, got back on track on Sunday by sinking the Marlins 9-4. Freddie Freeman's three-run blast rallied the Braves before BJ Upton drove in the tie-breaking run.
Stephen Strasburg gave up four hits, striking out 10 en route to the first complete game of his career as the Washington Nationals sealed a three-game sweep of the Philadelphia Phillies with a 6-0 success.
The Colorado Rockies also completed a three-game sweep, Nolan Arenado's go-ahead double in the seventh inspiring a 3-2 win over the NL Central-leading Pittsburgh Pirates.
In other NL games, Joey Votto's walk-off sacrifice fly in the bottom of the 13th inning handed the Cincinnati Reds a 3-2 triumph over the San Diego Padres, the St Louis Cardinals ended a four-game skid by downing the Chicago Cubs 8-4 and the New York Mets prevailed 9-5 against the Arizona Diamondbacks.
JJ slugged a go-ahead two-run homer in the seventh inning as the Baltimore Orioles defeated the San Francisco Giants 10-2 in Interleague play, while the Los Angeles Dodgers were 8-2 winners against the Tampa Bay Rays and Felix Hernandez pitched eight shutout innings in the Seattle Mariners' 2-0 victory over the Milwaukee Brewers.