Oran Kearney's side edged home 4-3 and their reward is a home tie against Dungannon Swifts in the next round.
The Bannsiders had Michael Hegarty sent off after 26 minutes, but produced a superb performance to race into a 4-1 lead before holding off a late rally from the Reds.
Coleraine broke the deadlock on 11 minutes as Paul Owens drilled the ball home from close range after the Reds failed to clear a Ruairi Harkin corner.
Then came the departure of Hegarty, a straight red from referee Raymond Crangle for a challenge on Tomas Cosgrove.
However, despite being down to ten men the home side were unlucky not to double their lead as Owens curled a shot towards goal, but Eamonn Seydak cleared the ball off the line.
It was not long before it was 2-0 - this time Owens setting up Gary Browne who delivered a measured finish.
Goalkeeper Eugene Ferry helped protect the lead with two fine saves to deny Diarmuid O'Carroll and Chris Curran from point blank range.
Any hopes Cliftonville had of mounting a challenge after the restart faded when Davy McDaid was brought down in the box by Jamie McGovern and from the penalty award McDaid made no mistake.
Within three minutes, the Reds pulled a goal back when O'Carroll headed home a Cosgrove cross.
The three goal cushion was restored thanks to a stunning effort from Harkin, but the home side were forced to battle it out to the end as the Reds produced a fightback with goals from Ciaran Caldwell and Joe Gormley.
In a tense finish, Cliftonville almost brought it to 4-4 but Martin Murray's cross came back off the bar and Coleraine go through.
Championship One side Armagh also produced an upset as they saw off Ards 3-1 at Holm Park.
Despite going behind to a goal from William Faulkner, the home side settled and responded with a brilliant second half effort that brought them three goals and earned them a money spinning a home tie against Glentoran.
Stevie Murray began the fightback on 54 minutes and soon after Ultan Lennon put Armagh into the lead.
Murray struck again from the penalty spot to make it 3-1 on 84 minutes and Ards had no way back.
Ballymena had a tough battle before finally seeing off a determined H&W Welders.
The decisive goal of the replay at The Showgrounds came with 15 minutes to go when Gary Thompson earned the Braidmen a trip to Linfield.
The visitors started brightly with Mark Magennis going close with a long range effort and then Craig Harris's header forced Shanahan into a smart save.
The home fans had to wait until the second half before seeing the best chance of a Ballymena goal when David Cushley connected well but his firm drive was saved by Windrum.
The woodwork came to the rescue for the Welders on 65 minutes when Mark McCullagh's header from Ally Teggart's corner came back off the bar.
The momentum was with Glenn Ferguson's side at this stage and the pressure told in the end. Thompson set off on a surging run, played one-two with Michael McLellan before finding the net with a neat finish.
One goal was enough at Ferney Park as Ballinamallard earned a home tie against Glenavon in the last 16.
Ryan Campbell found the net after 20 minutes and it proved enough to squeeze past stubborn Strabane who pushed the Premier League side all the way.
The home side made it hard for themselves by missing a couple of easy chances in the first half and with only one goal in it there was always sometime for Strabane to play for.
In the second half, it was fairly even with the best chance falling to Ballinamallard, David Kee unlucky to see his brilliant free kick hit the crossbar.
Elsewhere the biggest upset saw Championship 2 side Armagh City defeat Premiership side Ards 3-1.
Earlier, Lisburn Distillery defeated PSNI 2-0 in the lunchtime kick off.
Fifth Round replay results:
Coleraine 4 - 3 Cliftonville
Coleraine: Owens (11), Browne (35), McDaid (pen 50), Harkin (70) s/o Hegarty (23).
Cliftonville: O'Carroll (53), Caldwell (76), Gormley (80).
Armagh City 3 - 1 Ards
Armagh: Murray (54 pen 84), Lennon (60)
Ards: Faulkner (12)
Ballinamallard 1-0 Strabane Athletic
Ballnamallard: Campbell (20)
Ballymena United 1-0 H&W Welders
Ballymena: Thompson (75)
Irish Cup Sixth Round draw:
(Ties to be played on 8 February.)
Armagh City v Glentoran
Ballinamallard United v Glenavon
Ballyclare Comrades v Carrick Rangers
Coleraine v Dungannon Swifts
Crusaders v Ballymoney United
Linfield v Ballymena United
Lisburn Distillery v Queen's University
Warrenpoint Town v Bangor