Damien Duff snatched the precious maximum points, firing past Gomes in the 90th minute to give Joe Kinnear a massive boost.
Victory lifted the Magpies to the relative safety of 12th place to leave Kinnear a happy man.
Joe Kinnear: "I am delighted because we have suffered the opposite in the last two home games.
"We were two up against Stoke, they scored in the 90th minute and it was a kick in the teeth that day; and of course, we had Wigan as well and they scored in the 90th minute and got a draw.
"We felt those two games, we let slip, so it's nice for one to go our way."