The National League outfit took a dream 11th-minute lead in their third round replay at the Macron Stadium when Joe Partington sent a travelling contingent of more than 500 into raptures.
Gary Madine levelled for the home side six minutes before the break and when Dean Moxey made it 2-1 four minutes later, Neil Lennon's men looked to be on their way.
However, in a remarkable end to the first half, Kaid Mohamed levelled in stoppage time and it took a 57th-minute winner from Darren Pratley, whose 87th minute equaliser in the first game had spared Bolton's blushes, to secure a home tie with Leeds.
Barclays Premier League duo Aston Villa and West Brom both negotiated their way into the fourth round against lower league opposition, although neither found the task straightforward.
Remi Garde's men needed a 75th-minute Ciaran Clark header and a second goal from midfielder Idrissa Gana - his first for the club - at the death to see off League Two Wycombe 2-0 at Villa Park, while Salomon Rondon's lone strike was enough to put the Baggies through in a tight encounter at Championship Bristol City.
Villa's reward his a home tie with Manchester City, while West Brom will entertain League One Peterborough.
There was an upset at Fratton Park, where League Two Portsmouth took a 2-0 first-half lead over Championship promotion contenders Ipswich courtesy of Gary Roberts' penalty and a Marc McNulty header, and then managed to hang on to win 2-1 after Town, who later had defender Piotr Malarczyk sent off for a second bookable offence, pulled one back through Ainsley Maitland-Niles.
Pompey will face Premier League Bournemouth in the fourth round, while MK Dons will also entertain top-flight opposition - in their case Chelsea - after disposing of League Two Northampton 3-0.
More than 7,000 Cobblers fans made the trip to Stadium mk, but penalties from Ben Reeves and Simon Church either side of Josh Murphy's strike eased the Championship side to victory.
The comeback of the night came at the Madejski Stadium in an all-championship clash between Reading and Huddersfield with Matej Vydra's hat-trick cancelling out and then overhaulling the 2-0 lead into which the Terriers raced after just 15 minutes
Reading's reward is a home tie with League One Walsall.
Huddersfield will rue Jonathan Hogg's red card, though
They were 2-0 up through Jamie Paterson and Tommy Smith when Hogg went, with Vydra plus Lucas Piazon and Alex making them pay.
Former Carlisle striker Francois Zoko passed up a glorious opportunity to put Yeovil into the next round at the expense of his old club when he missed a 90th-minute penalty with the score at 1-1, and he was made to pay when Mark Ellis fired home the decisive spot-kick which takes Premier League Everton to Brunton Park.
In 90 minutes Jack Compton and Antony Sweeney traded goals.
Penalties were also required to separate League One Bradford and Bury after a goalless draw, and Shakers keeper Ian Lawlor saved from Steven Davies and Devante Cole to allow Jacob Mellis to win it 4-2 and hand Championship Hull a trip to Gigg Lane
Bury played for 80 minutes with 10 men after Nathan Cameron was sent off.
Source : PA