Gardner walked, advanced to second on Ramiro Pena's sacrifice and came home when second baseman Hall mishandled Derek Jeter's infield single.
The win, in a game rescheduled from Friday night's rain-out at Fenway Park, was crucial for the Yankees' hopes of winning the American League East title. They entered the contest with a one-game lead over the Tampa Bay Rays.
Robinson Cano went 3-for-5 with a homer, two doubles and two RBI. Curtis Granderson, Mark Teixeira and Alex Rodriguez also drove in runs for the Yanks.
Phil Hughes (18-8) picked up the victory with a scoreless inning of relief and Mariano Rivera notched his 33rd save of the year.
Mike Lowell, who was honored before the game on the eve of his retirement, got a two-run double and Daniel Nava drove in a run for Boston.
Red Sox reliever Jonathan Papelbon (5-7) absorbed the defeat.