Newcastle boss Eddie Howe hopes his team's "massive" victory at Leeds can "transform our season" as they fight to avoid relegation.
Jonjo Shelvey's 20-yard free-kick earned what was only a second win of the season in an energetic and tempestuous encounter where both sides struggled to make the most of first-half chances.
But after Newcastle goalkeeper Martin Dubravka saved Dan James' point-blank shot and Illan Meslier palmed Shelvey's volley away, the visitors finally found a breakthrough.
The 75th-minute goal came from a brilliant run by substitute Javier Manquillo, who was brought down on the edge of the box.
Shelvey stepped up and fired past Meslier, who perhaps should have done better, given the ball went in on his side of the goal.
Howe said: "Today we learned that there's a resilience in the team. They are fighting for each other and fighting for the club.
"They have belief that we're not dead and buried and there's more to come. I'm so pleased for everybody connected with Newcastle that we won the game. It was a big match and hopefully it can transform our season."
Leeds had earlier wasted a great chance through Jack Harrison, whose goal-bound shot was well-blocked by Fabian Schar, and they paid for the absence of injured striker Patrick Bamford.
It proved a turning point as Newcastle resiliently held on, despite dropping 21 points from winning positions already this season.
After Norwich's win over Watford, Howe's side failed to exit the bottom three, but such a victory provides a much-needed boost ahead of a two-week break where the team will travel to Saudi Arabia for a training trip.
The significance of Shelvey's goal and the three points for Newcastle cannot be underestimated in the context of what has been a difficult season for the visitors.
Following the club's October takeover by new Saudi owners, it was hoped a poor start could be eliminated once Howe was appointed as the new manager.
Further hope came when they entered the transfer window as Kieran Trippier and Chris Wood joined the club. But a porous defence has hampered their attempts to move up the table and frustrations in the transfer market this week led to a feeling among some fans that relegation looked increasingly likely.
Questions about their upcoming trip to Saudi Arabia hardly helped the mood.
But to hang on for a precious success sparked delight at the final whistle among the players and Howe, as Trippier and the manager led the applause in front of their travelling fans.
There were some fine displays from the visitors, who were tested by Marcelo Bielsa's team in a, sometimes, frantic game where only poor finishing let both sides down.
Willock, who replaced Sean Longstaff in the starting line-up, showed his quality with some fine ball-carrying which not only relieved pressure on the defence but added to Allan Saint-Maximin's presence in attack. The former Arsenal player could also have scored in stoppage-time but Meslier denied him with a good save.
Schar's block proved crucial, while Longstaff - who replaced the injured Joelinton before the break - also contributed to a team performance which will give Howe hope for the future.
There have been questions about whether Howe was best suited to keep Newcastle in the top flight despite a previous relegation with Bournemouth. But after a positive display which only ended with a draw against Watford last week, this showed his team are moving in the right direction.
Howe said the win was also down to the "power of recruitment" and said the club was still active in the transfer market.
He added: "Wood and Trippier were magnificent for the team. I thought they made huge contributions to the match and that's the power if you can get [recruitment] right, you can elevate the team.
"We're still looking to do that, but I do back the players that we have here already."
Although Leeds missed Bamford, they still created chances through Raphinha, who had Paul Dummett on toast, and Harrison, who caused problems for Trippier.
James also lacked the killer instinct up front even if his hard work and endeavour was appreciated by the partisan home support.
For the first 20 minutes, it was Leeds who looked most likely to score. But once Shelvey's left-footed volley was saved by Meslier, Newcastle brought a balance to the game which they did not relinquish.
Wood, facing a former side and targeted with "greedy" chants by the home fans after his £25m move from Burnley, had another quiet match and twice failed to connect when set up by Trippier and Ryan Fraser.
But as the game became more feisty in the second half, Shelvey kept a cool head to send the Newcastle fans home with a rare moment this season to enjoy their Saturday night.