The 36-year-old Sweeney converted second half tries by replacement flanker Jake Thomas and hooker Huw Dowden to cut the gap to two points after the visitors had fallen 18 points adrift and then struck with the match winner five minutes from time.
Sweeney, capped 35 times by Wales, crossed for a try which he also converted to make it 24-20 in the end and move Ponty three points clear of Newport at the top. For the Wizards it was a cruel end to a game that looked to be well in their control and ended with a fifth defeat in their last six games in all competitions.
The first points of a tight and tense game only arrived seven minutes before the break when Aberavon centre David Evans sent wing Jay Baker racing clear. James Garland converted and then added a penalty nine minutes into the second half to make it 10-0.
Garland then saw yellow for a late tackle, but the points kept on coming from the home side as Chris Davies led the charge off the back of a scrum to allow David Pritchard and Stefan Andrews to inter-pass before Andrews crossed for the try of the match
Richard Carter deputised for the unavailable Garland and added the conversion and, at 18-0 down, Ponty had 25 minutes to turn things around. And so they did!
Thomas opened their account with a corner try, with Sweeney completing the touchline conversion, and then Dowden drove over. Sweeney once again converted to make it 18-16, but a Garland penalty extended the home lead to four points.
Sweeney then struck with a third try for the visitors, which he again improved, and victory had been plucked from the jaws of defeat by the champions.
“I’m absolutely chuffed with the win and with the performance. We could easily have let the game slip away from us, but we showed great character and thankfully turned things around,” said Ponty skipper Dafydd Lockyer.
While the champions returned to the top of the table, their tenure there could be short lived if Cross Keys maintain their recent run of form. Their 24-12 triumph at Bridgend moved them to within nine points of the top with two games in hand.
Keys travel to Sardis Rod this weekend for a crucial game on a weekend when fifth placed Llandovery host third placed Aberavon. Keys were 24-22 winners at home against Ponty earlier in the season.
Having won 20-13 at the Bridgend Ford Brewery Field in the SSE Swalec Cup earlier in the month the Gwent side arrived knowing just how difficult a task they faced and they raced into a 16-0 lead in the opening 10 minutes thanks to tries from outside half Ethan Davies and wing Matthew Powell, both of which former Ravens player Owen Howe converted.
It stayed that way until half-time, despite the home side losing Matthew John to a yellow card shortly before the break, and hit back with a try from wing Mike Powell. Back came Keys with a typical driving line-out try from flanker Scott Matthews and Howe’s third conversion gave them an 18 point lead.
A second try from home wing Powell set-up a frantic finish, but that was as good as it got for the Ravens.