The Red Sox had led 2-0 since the second inning behind six shutout frames from starter Felix Doubront, but New York's Russell Martin halved the deficit with a solo homer in the seventh.
Boston, however, came back to take the lead in the 10th off David Robertson (1-4).
Jarrod Saltalamacchia walked and Will Middlebrooks singled with none out. Saltalamacchia went to third on Ryan Sweeney's groundout, then scored the decisive run on Ciriaco's flair single into right field.
Aceves (2-6) followed by setting New York down in the bottom of the 10th to wrap up Boston's win in the rubber match of a three-game series at Yankee Stadium.
2014: The Year in Music [PHOTOS]