The Rays put two runners on base in the first, third, fifth and seventh innings, but lost for the fourth time in five games.
Garcia (8-7) gave up eight hits without walking a batter and struck out seven over 6 2/3 innings. Boone Logan, David Robertson and Mariano Rivera retired the final seven Rays in order, striking out five of them.
Rivera came on in the ninth in a non-save situation after the Yankees had scored twice in the top half of the inning.
In his previous start, Garcia had given up five runs on seven hits with four walks in just five innings against Toronto.
Derek Jeter singled to start the game for the 3,009th hit of his career and scored on Curtis Granderson's 26th homer. Eduardo Nunez drove in the other New York runs in the ninth with a single.
After giving up the two runs to start the game, David Price (9-8) allowed only four more hits over 7 1/3 innings in suffering the loss.
Celebrity Families of 2014 [PHOTOS]