The League One outfit, who included Jermaine Beckford and saw Enoch Showunmi return from injury, had looked set to claim the spoils when they led 3-1 late in the game. However, the Minstermen struck twice in the dying minutes to earn a draw.
Adam Smith put York ahead midway through the first half with a shot into the top corner but Luciano Becchio soon levelled.
Youngster Mike Whitwell made it 2-1 five minutes into the second half and when Andy Milne stabbed home Leeds looked worthy winners.
However, Alex Lawless fired in from distance and in the last minute York netted again.