The midfielder struck from 12 yards with six minutes remaining to secure a 1-1 draw just when it looked as though Bradley Dack's 56th-minute header had condemned the Premier League Magpies to a seventh third-round exit of Mike Ashley's controversial 12-year ownership.
If the equaliser came as a relief to fans who had seen their side lose eight of its previous 11 games at St James' Park, there was little disguising the fact that it was barely deserved with Rafael Benitez's understudies – he made eight changes – labouring against lower-league opposition.
England's Under-20 World Cup-winning goalkeeper Freddie Woodman found himself under early pressure after the visitors forced two corners in quick succession, but it was opposite number David Raya who had to be at his best to repel Joselu's acrobatic effort and Kenedy's shot from a tight angle.
Woodman fielded Danny Graham's mis-hit 12th-minute attempt with ease after Craig Conway had found space down the right but, as the half wore on, the Magpies worked their way into the game.
They came close to taking a 28th-minute lead when they broke at pace but Ritchie's initial strike was saved by Raya before Elliott Bennett managed to block Joselu's follow-up.
Blackburn defender Darragh Lenihan thumped a long-range attempt wide of Woodman's right post four minutes before the break and Charlie Mulgrew's late corner sailed dangerously across the six-yard box with the visitors pressing once again.
Jacob Murphy side-footed wastefully high and wide from Ritchie's 48th-minute cross but Dack was equally wasteful after being played in by Lewis Travis at the other end five minutes later.
However, Dack made amends with 56 minutes gone when he rose unopposed to power a header past Woodman from Bennett's inviting cross as Newcastle's vulnerability from set-pieces was exposed once again.
Benitez immediately sent on Jonjo Shelvey and he might have announced his arrival on the hour when he met Ritchie's corner, although his header lacked both the power and direction to trouble Raya.
Javier Manquillo had to hack Mulgrew's hooked effort of the line five minutes later as another corner caused problems for the home defence.
Raya then produced a fine save at the other end to keep out another Shelvey header and his team-mates rallied to survive a goalmouth melee – and concerted penalty appeals – in the aftermath.
Referee Kevin Friend did point to the spot after substitute Ayoze Perez had been felled by Corry Evans and Ritchie duly obliged to spare his side's blushes.