The former Swansea player came off the bench for the second half and scored in the 89th minute, sparking delight in the visitors' ranks.
Spanish midfielder Hernandez found the bottom left corner after Luke Ayling cut the ball back, just as Leeds looked like being frustrated.
Now they sit three points clear of second-placed West Brom and six ahead of in-form Brentford, who occupy third spot, and only three rounds of games remain.
Leeds have been absent from the top flight of English football since their relegation in 2004, which came just three years after a run to the Champions League semi-finals.
Veteran manager Marcelo Bielsa was persuaded to stay for this season, having gone agonisingly close last term to the elusive promotion.
Now, though, Leeds looks ready to end its long wait, with games against Barnsley, Derby County and Charlton Athletic to come and a maximum of four points required.
The latest step on the road back to the elite came a day after the death was announced of one of their greatest players, England World Cup winner Jack Charlton, who spent his entire club career with Leeds.
Stoke City and Birmingham City have played Premier League football more recently than Leeds, but this season has been one of battling the threat of dropping into the third tier for both.
Stoke earned a 2-0 win over Birmingham on Monday (AEST) to join the Blues on 49 points, with both sides now four points clear of the relegation zone.
Beaten 5-0 by Leeds in its previous outing on Friday (AEST), Stoke bounced back thanks to goals from Danny Batth and captain Sam Clucas.