The Yankees erased a 1-0 deficit and put the game away with four runs in the fourth.
Eric Chavez walked, Russell Martin reached on an error and Eduardo Nunez singled to load the bases with no outs before Gardner lined a 1-1 pitch from Jake Arrieta (10-8) into the right-field corner, sending home all three.
Gardner then scored on Curtis Granderson's groundout and the Yankees went on to record their fifth win in seven games.
Garcia (10-7) held the O's to two runs on five hits, walking a pair and striking out six to post a win in his third straight start.
Hector Noesi and David Robertson combined for two scoreless innings and Mariano Rivera racked up his 27th save with a 1-2-3 ninth for New York.
Yankees shortstop Derek Jeter left the game in the fourth with a bruised right middle finger after being struck by an Arrieta pitch. He was listed as day-to-day after X-rays came back negative.
Arrieta yielded four runs (two earned), issuing six walks and five hits in a five-inning start.
2014: The Year in Music [PHOTOS]