The Black and Ambers recovered from a 3-20 deficit to score 29 unanswered points and hit the front in the 70th minute when replacement centre Scott Williams dove over in the corner.
The win puts Newport six points clear at the top of the table with three matches remaining and a huge advantage in the try count. They need only one more victory to secure the title.
Newport coach Leigh Jones said: “As a coach, you don’t like games to be that close – even if it’s nice for the fans.
“I’m delighted for the players. We didn’t start very well but in the end it was a great performance by the pack and I think we really deserved to win.”
All Blacks winger Kevin James scored the game’s first try and veteran backrower Brett Sinkinson added a second before his yellow card turned the game in Newport’s favour.
The Black and Ambers hit back with a try to No 8 Rhys Jones and fly-half Dan Griffiths’ goal-kicking narrowed the margin to 13-20 at halftime.
A powerful try from skipper and backrower Gareth Gravell was converted by Griffiths to level the scores at 20-apiece before Williams’ heroics and late tries to Newport winger Will Kershaw-Naylor and Neath centre Adrian Durston.