Steven Fletcher came to Burnley's rescue as Hartlepool threatened to end their Carling Cup dream at the first attempt.
The League One side were within six minutes of victory against their Premier League opponents when the £3million former Hibernian striker, who had been introduced as a 61st-minute substitute, smashed home the equaliser which took the tie into extra-time.
But manager Owen Coyle had further cause to be grateful to the Scotland international when, after full-back Richard Eckersley had been sent off, he headed home the winner to send the 10 men through to the third round and keep alive their hopes of repeating last season's remarkable run to the semi-finals.
However, it was not until the second-half introduction of Fletcher, Martin Paterson and Robbie Blake that the Clarets turned the tie around with Chris Turner's men looking more than capable of springing yet another cup surprise after Adam Boyd's 39th-minute opener.
Pools enjoyed their giant-killing exploits last season, when they dumped then Premier League West Brom out of the same competition at the same stage, and then disposed of Stoke in the FA Cup third round.
Having already seen off Coventry, who were leading the Coca-Cola Championship at the time, at the Ricoh Stadium in the previous round, they had high hopes of claiming another scalp, and optimism increased at Victoria Park when Coyle's team sheet featured 10 changes from the side which beat Everton 1-0 at the weekend.
With a daunting trip to Chelsea to come on Saturday, that was hardly surprising and in the early stages, the Scot must have been reasonably pleased with how his second string performed.
Indeed, they would have taken the lead with 22 minutes gone had striker Jay Rodriguez delayed his run long enough to avoid an offside flag as he set off in pursuit of impressive winger Fernando Guerrero's through-ball.
Rodriguez was guilty of a casual attempt to finish eight minutes before the break when he tried to back-heel Kevin McDonald's cross past goalkeeper Scott Flinders, but directed the ball straight at him.
With wide men Guerrero and Chris Eagles causing problems for Pools full-backs Steven Haslam and Peter Hartley, the home side found themselves up against it at times.
But they defended manfully as a team and when their big chance came, they took it without a second thought.
Andy Monkhouse, who along with fellow winger Leon McSweeney had helped to shift the balance of the game as the half wore on, crossed neatly to the far post six minutes before the break for Boyd to arrive and thump a shot past goalkeeper Diego Penny.
It was only thanks to Penny that it was not 2-0 two minutes later when Monkhouse drilled in a rising shot which the goalkeeper did well to palm away.
Coyle resisted the urge to make half-time substitutions but made his move with 29 minutes remaining when he replaced front two Rodriguez and Steven Thompson with Fletcher and Paterson.
Burnley went for broke five minutes later when Blake, whose goal clinched a famous first top-flight victory against Manchester United, arrived in place of Eagles.
But Behan was just inches away from connecting with Monkhouse's cross in front of goal as the Lancashire club lived dangerously.
Paterson fired across the face of goal after turning smartly on to Fletcher's pass with 16 minutes remaining, but the equaliser finally arrived with six minutes left on the clock.
Fletcher forced his way into the box and blasted a close-range shot from a tight angle past Flinders to level.
He might have snatched victory four minutes later but for a solid save from Flinders with Guerrero making a mess of the rebound, and Blake, whose arrival had revitalised his side, fired inches wide deep into injury time after a mazy run into the box.
But the game almost turned again two minutes into extra-time when Pools substitute Colin Larkin rattled the crossbar with a blistering shot.
Behan fired just wide at one end and McDonald forced a good save from Flinders at the other, but the visitors' task grew in difficulty when Eckersley was dismissed for a second yellow card.
However, it was the Clarets who snatched victory 108 minutes into a pulsating encounter when Fletcher rose high to thump home a header from Paterson's cross and break local hearts.