New York took control of the game with three runs in the fifth inning. The Yankees then added two more in the sixth before scoring their final run in the seventh.
Toronto scored its runs in the seventh and ninth innings.
Aaron Judge and Anthony Rizzo each homered for New York while Jhony Brito threw 5 1/3 hitless innings with three strikeouts.
Francis Bowden went 4 1/3 innings en route to taking the loss.
Toronto hosts the Philadelphia Phillies on Monday.