New York (9-13) scored five runs in the fifth inning to take an 8-1 advantage. But Toronto (9-10) countered with eight runs of its own over the next three innings, including five in the eighth, for a 9-8 lead.
However, the Yankees scored twice in the bottom of the eighth for the 10-9 advantage.
Berroa and Bo Bichette both homered for Toronto. J.C. Escarra and Giancarlo Stanton also did for New York.
Toronto hosts the Minnesota Twins on Sunday.