Visitors Brentford were unbeaten in their opening four matches but that sequence was ended as Newcastle recorded a first clean sheet of 2023/24 and a second win in three matches on Tyneside.
There were several controversial moments, particularly in a second period where United were awarded one spot-kick and given another which was overturned, as well as seeing a goal contentiously ruled out, but Eddie Howe's men did enough to chalk up a timely victory ahead of their midweek Champions League trip to AC Milan.
Howe made five changes to the side beaten at Brighton two weeks ago, with Sven Botman returning from injury and Wilson, Elliot Anderson, Harvey Barnes and Sean Longstaff coming in for Matt Targett, Alexander Isak, Sandro Tonali, Joelinton and Miguel Almirón.
With United in action at St. James' Park for the first time in three weeks, the home crowd were right behind the Magpies but it was Brentford who almost struck first when Mathias Jensen slid the ball to Aaron Hickey, whose powerful close-range drive was blocked by Nick Pope.
And while Newcastle probed, the visitors looked more dangerous in the opening part of the match, with Yoane Wissa just failing to turn in a Jensen cross from the right in the 23rd minute.
Perhaps that was a wake-up call for the home side because they began to up the ante after that and only Mark Flekken's trailing leg denied the diving Bruno Guimarães at the far post after a Kieran Trippier corner was flicked towards the Brazilian by Botman.
In the 31st minute, Barnes fizzed a ball across goal which Flekken got an important touch to before Longstaff recycled play and dug out a cross from the right but it was headed over by Wilson, then seven minutes later the same player nodded off target from a Trippier delivery.
United continued to be on the front foot in the second half and had the ball in the net in the 58th minute. Flekken flapped at a high ball as Wilson stood his ground before the striker swept home amid the confusion, but referee Craig Pawson ruled it out for a supposed foul on the Brentford keeper.
But the Magpies number nine, who signed a one-year contract extension during the week, soon had his third goal of the season - with the Bees' Dutch goalkeeper again at the centre of the drama.
He rushed out of his goal to clumsily bring down Gordon and Wilson emphatically fired home from the spot to go level with Les Ferdinand in fourth place in Newcastle's all-time Premier League goalscoring chart - his 41st top-flight goal for the club coming in his 80th appearance.
After Pope had fielded an effort from Brentford substitute Kevin Schade, Pawson pointed to the spot for a second tim when Bryan Mbeumo handled in the box, but the referee then reversed his decision following a VAR check.
That made for a nervy finale, particularly with nine minutes of stoppage time, but United rarely looked like surrendering their narrow advantage and will now travel to Italy on the back of an important three points in the Premier League.