Sean Long's dramatic 40-metre drop goal 13 seconds from time denied Warrington a famous victory at Knowsley Road.
Warrington looked set for only their second derby win in 33 Super League attempts when they led 16-10 with only four minutes left.
Then Lee Gilmour forced his way over with Long adding the conversion before the ex-Great Britain scrum-half struck his crucial one-pointer.
It was cruel on Warrington who had turned in a magnificent performance.
Keiron Cunningham had plenty to celebrate as he became only the second player to chalk up 300 Super League appearances.
The former Great Britain hooker helped table-toppers Saints maintain their jinx over Warrington and move two points clear of Leeds in driving rain.
Skipper Cunningham burrowed over for a trademark try from dummy-half to fire Saints ahead after only six minutes.
Leeds centre Keith Senior has played 323 games out of a possible 344 with Cunningham next in the list.
Saints have now set a summer record of 18 successive wins - beating their own previous best achievement of 17 established in 1996.
Warrington, who had won seven of their eight matches since Jimmy Lowes took over as coach from Paul Cullen, went into the clash without Louis Anderson who broke his arm against Leeds last week and joins elder brother Vinnie on the sidelines for the rest of the season.
Saints welcomed back Long, who missed last week's romp at Wakefield, through mumps with Nick Fozzard making his comeback as sub after being out since February following knee surgery.
Warrington immediately caught Saints napping with Matt King collecting Lee Briers' kick-off.
But Saints grabbed the first try through Cunningham after James Graham was stopped short.
The Wolves were 10-0 down after 14 minutes with Gilmour, James Roby and Matt Gidley combining for Ade Gardner to bag his 27th try of the season.
Cunningham's lost possession allowed King to shrug off Long to open Warrington's account with Chris Hicks booting the touchline conversion.
Sloppy handling cost Saints several tries with Warrington responding to apply their own pressure just before the break and it was no surprise when Chris Riley collected Martin Gleeson's clever flick pass to go over in the corner to level the scores.
The Wolves should have gone ahead early in the second half but Hicks missed the chance after Michael Monaghan's kick ricocheted off Leon Pryce.
But Warrington deservedly went in front with a sizzling 70m try on the hour.
Simon Grix took Gleeson's pass and bounced off Francis Meli to send Riley dashing 40m for his second try with Hicks tagging on the conversion to make it 16-10.
Meli missed Long's kick in the greasy conditions 10 minutes from time as Warrington sensed a famous victory.
But then Gilmour, head-bandaged, powered over from close range after 76 minutes with Long booting the conversion to level the scores 16-16.
Then Long added a superb drop goal after Briers had missed with a similar effort for the Wolves.