The Black Cats had taken the lead early in the first-half as David Healy fired home smartly.
But that was against the run of play and Rovers grabbed a deserved leveler when Aaron Mokoena fired home wonderfully from 25-yards on the stroke of half-time.
Both sides spurned numerous chances to stop the game going into extra-time - but with the match heading for penalties it was Rovers who landed a fifth round home clash with Championship Coventry as McCarthy headed home from close-range.
The home side almost took the lead as early as the third minute when Zurab Khizanishvili's effort came back off the inside of the post following a corner from Villanueva.
Sunderland again found themselves on the back foot a minute later and Scotland goalkeeper Craig Gordon - back in the side after an ankle injury - did well to push away a shot from David Dunn.
Early leadThe visitors, however, took the lead in their first attack in the seventh minute through Healy.
The Northern Ireland striker, making only his third start, was the first to react when Daryl Murphy's shot spun off Ryan Nelsen.
It was a cool finish by Healy and his second goal for Sunderland, his only other strike coming against Nottingham Forest in the Carling Cup in August.
That goal gave the visitors a boost and Steed Malbranque rattled a shot narrowly over the bar in the 16th minute following some sloppy defensive play.
Blackburn hit back and Gordon reacted quickly to push out Keith Treacy's effort two minutes later.
Gordon was showing no rustiness after his 10-week absence and reacted well to deny Jason Roberts in the 25th minute.
Blackburn should have equalised nine minutes later but Roque Santa Cruz squandered a glorious chance.
The Paraguay striker, who looked on his way to Manchester City in the transfer window, screwed a header wide from four yards following Carlos Villanueva's corner.
Great levellerIt was a clear chance but Blackburn regrouped and drew level in the 37th minute.
Mokoena sent a 25-yard thunderbolt into the corner, leaving Gordon stranded, after Villanueva's effort had been blocked.
It was the South African's first goal in almost two years and a timely one at that.
Mokoena's last goal came in the FA Cup as well - against Manchester City in March 2007.
Blackburn almost went ahead two minutes into the second half when Santa Cruz peeled away from his marker after Villanueva had delivered the free-kick.
The striker's header was clean enough but Gordon was equal to it and pushed the ball over the bar.
There was little to choose between the sides and Grant Leadbitter went close in the 58th minute following a surging run down the left from George McCartney.
Play switched down the other end and Roberts turned quickly in the penalty area, only for Gordon to block his effort.
Gordon then kept his side on level terms in the 73rd minute when he pushed over a superb free-kick from Villanueva that seemed goal-bound.
Then Khizanishvili sent a free header over the bar nine minutes later following Villanueva's corner.
Sunderland hit back and Reid failed to take advantage in the 85th minute when Carlos Edwards played the ball to him at the back post but he got a poor first touch and the match went into extra-time, paving the way for the dramatic finish.
1st Half Goals
Shots on Target
Shots off Target