Substitute Fabio Borini came to Sunderland's rescue as his 90th-minute leveller earned a 2-2 draw against Crystal Palace and moved Sam Allardyce's men out of the Premier League relegation zone.
Sunderland opened the scoring at the Stadium of Light when Dame N'Doye - signed on loan from Trabzonspor in January - scored his first goal for the club in the 36th minute.
However, Palace turned the match on its head in the second half with former Sunderland striker Connor Wickham sparking a revival with a five-minute double.
Wickham levelled with an emphatic finish in the 61st minute and he put Alan Pardew's men, who remain without a league win in 2016, ahead after pouncing on a loose ball from a Palace corner.
Sunderland were staring down the barrel of a second-consecutive league defeat, but Borini brought the home fans to their feet in the 90th minute when his cross-shot found the bottom left-hand corner.
A point moves the Black Cats up to 17th and out of the bottom three on goal difference after Norwich City were beaten by Chelsea, while Palace's winless league run now stretches to 11 matches.
In a tight start, Wilfried Zaha and Yannick Bolasie - starting for the first time since December in one of two Palace changes - caused Sunderland's defence problems.
At the other end Jack Rodwell, starting his first game of 2016 in Sunderland's only change, tested Wayne Hennessey with a well-hit drive.
The game remained open and Vito Mannone was out quickly to deny Damien Delaney from Wickham's knock down, the Palace man subsequently claiming he was impeded by John O'Shea.
Sunderland then lost captain O'Shea to injury with Younes Kaboul returning to take his place, before Dann escaped his marker to head Yohan Cabaye's corner towards goal and draw a fine stop from Mannone.
That save proved crucial as Sunderland moved ahead in the 36th minute. Jermain Defoe teed up N'Doye and his 25-yard strike hit Dann and deceived the helpless Hennessey.
Palace issued an early second-half warning when Wickham mistimed a header from Zaha's floated right-wing cross, and the ex-Sunderland man then stunned the Stadium of LIght with a quickfire brace.
The visitors levelled when Bolasie played in Wickham on the left of the box and his shot on the turn cannoned off the post and into the back of the net.
Wickham's every touch was subsequently booed, but he silenced the home fans again in the 66th minute when Jordon Mutch's corner fell kindly in the area and he volleyed in from close range.
Sunderland lost Lee Cattermole, himself on as a second-half substitute, to a nasty cut just above his eye, before Wickham was replaced by Emmanuel Adebayor.
And it was Cattermole's replacement Borini that proved the hero for Allardyce. The Italian forward received the ball on the right of the box and his apparent low cross missed everyone and nestled in the far corner.