After Rodrigo's deflected strike put Leeds ahead inside fifteen minutes, the Whites squandered bags of strong chances to extend their lead.
Kenny McLean looked to have rescued a point for the visitors with moments left to play as he poked home a Teemu Pukki cross, but 19-year-old substitute Joe Gelhardt had the final say in injury time.
The victory took the fifth-bottom Whites four points clear of the Premier League drop zone with nine games left, although second-bottom Burnley who are five points adrift have two games in hand.
Graham Smyth, the YEP's chief football writer, hands out the scores from Sunday afternoon's epic clash at Elland Road.

13. Robin Koch (sub)
6 - Came in with half an hour to go, kept it simple in the midfield. Photo by Stu Forster/Getty Images.

14. Joe Gelhardt (sub)
8 - Won a big header to put Raphinha away and was in the right place to get the winner. Got straight up to the speed of the game as a stoppage time sub. Picture by Tony Johnson.

15. Stuart Attwell (referee)
5 - Was in real danger of losing control of the game at times. Let too much go perhaps early on as he tried to let it flow. Photo by George Wood/Getty Images.

