In Yankees’ history, there have been 134 games where a pitcher has hit a home run. Unsurprisingly, all came prior to the implementation of the designated hitter. The last time it happened was by Lindy McDaniel on September 28, 1972. The DH came in the next season and it hasn’t happened for the Yankees since.
On three occasions, a Yankee pitcher has hit more than one home run in a game.
The first Yankees to ever pull off the feat was Red Ruffing on September 18, 1930. Ruffing hit two home runs off St. Louis Browns’ pitcher Fred Stiely.