After a goalless first half, Harvey Barnes had given the Magpies the lead with his tenth goal of the season, but Alex Scott levelled for the Cherries before David Brooks put Bournemouth in front.
But in the fifth minute of added time, Anthony Gordon's penalty forced extra time, where Barnes scored his second - but Marcus Tavernier levelled, meaning penalties. That's where Ramsdale starred to send United through.
Barnes had netted twice in Wednesday night's Premier League win over Leeds and was one one of four players to keep their place, with Malick Thiaw and Sandro Tonali - both withdrawn at half time in midweek - and Nick Woltemade the others.
Ramsdale started in goal against one of his former clubs and made the first save of the game, albeit a comfortable one, from Enes Ünal after a scrappy passage of play at the Gallowgate End.
Two minutes later the Newcastle netminder held a Eli Junior Kroupi effort - but the best opportunity of the opening exchanges fell to Yoane Wissa.
A lovely move involving Joe Willock, Jacob Ramsey, Barnes and Woltemade teed up the number nine inside the box, but Ðorde Petrović brilliantly kept out his goalbound strike.
Scott sent a dipping half-volley just over at one end before in the 12th minute, Wissa met a Barnes cross but his header lacked the power to trouble Petrović.
Ramsdale made another routine save from Kroupi but Newcastle were largely dominant and in the 40th minute, Sandro Tonali hit a howitzer just wide.
But the deadlock was broken early in the second half when Woltemade found the run of Barnes, and the winger's finish was typically unerring.
It was the third different competition he's found the net in this term, having already scored in the Premier League and Champions League.
Evanlison had a great chance to level soon afterwards as Newcastle conceded possession cheaply allowing the Brazilian to advance one-on-one with Ramsdale, but he stood tall to block.
On the hour mark, a thunderous header from Sven Botman crashed back off the bar following a Lewis Hall corner.
Bournemouth equalised moments later, when Scott tapped home from Evanilson's pass, then they surged ahead through Brooks, who curled a low effort beyond Ramsdale in the 68th minute.
United searched in vain for an opening to take the tie to extra time, with Anthony Gordon seeing a free kick held by Petrović and Joelinton looping a header over.
In the 89th minute Petrović made a superb stop from Gordon and although Barnes tucked home the rebound, he was offside.
But in added time, Tonali hared onto Woltemade's flick from Gordon's slide-rule pass, and Petrović could only bring him down. Gordon converted from the spot to send the game to extra time.
Botman made a brilliant goal-line clearance to deny Evanilson after he had squeezed a shot from a tight angle beyond Ramsdale.
At the other end, the Dutch defender - under pressure from Adrien Truffert - headed over from Hall's deep cross after a marauding run from the left-back.
Barnes shot wide in the final minute of the first half of extra time then the visitors' Alex Jimenez was slid through but was denied by Ramsdale.
Evanilson then squandered an opportunity at the beginning of the second period of extra time, before Ramsdale's reflexes were tested again as he kept out Scott from close range.
The Cherries were a threat on the counter and Scott had another chance in the 110th minute but Ramsdale was again equal to his effort.
A Tonali piledriver whistled over the bar after Gordon played a free-kick short to the Italian.
Seconds later, Barnes headed home from Gordon's left-wing cross - but then Tavernier prodded home to make it 3-3 and force a penalty shoot-out, with Gordon missing a golden opportunity with the last kick.
The spot-kicks were taken at the Leazes End and Gordon scored the first but Tavernier converted for the Cherries. Woltemade hit the bar, then Ramsdale saved from Evanilson.
Petrović then kept out Bruno Guimarães and Lewis Cook squeezed his penalty beyond Ramsdale. Tonali scored and Ramsdale saved from Jimenez.
Joelinton sent Petrović the wrong way but Marcos Senesi did the same to Ramsdale. Hall scored but so did James Hill.
Lewis Miley slotted home but Truffert followed suit. Barnes netted but Adam Smith did too. Malick Thiaw stepped up and scored. Ramsdale saved from Bafodé Diakité and United progressed.
Newcastle United: Aaron Ramsdale, Kieran Trippier (c) (Lewis Miley 70), Sven Botman, Sandro Tonali, Yoane Wissa (Anthony Gordon 70), Harvey Barnes, Malick Thiaw, Tino Livramento (Lewis Hall 59), Nick Woltemade, Joe Willock (Joelinton 70), Jacob Ramsey (Bruno Guimarães 79)
Substitutes: Nick Pope, Alex Murphy, Sean Neave, Sam Alabi




