Alex McLeish's side then sealed victory thanks to Dann's close-range effort with a minute of normal time remaining.
It was a dramatic conclusion to a pulsating game which saw the woodwork rattled once by the hosts and twice by the visitors.
Blackpool, playing at home for the first time since November 20, were slow to get out of the blocks and fortunate not to be a goal down within the opening two minutes.
Having been fed by Hleb, Liam Ridgewell sent the ball into the six-yard box for Matt Derbyshire, but with the goal at his mercy, the striker could only prod his effort wide.
Three minutes later the ball fell to Derbyshire in the area again as Cameron Jerome lashed a shot across goal but there was too much pace on it and the former Blackburn man could not capitalise.
Birmingham wasted another decent opportunity within seconds, Jerome the culprit this time as he failed to wrap his foot around Derbyshire's cut-back.
The hosts attempted to get a grip on the game and Neal Eardley rifled their first shot at goal over the bar in the 10th minute.
Matt Phillips tried to drill one but could not get much power on it and went closer soon after, connecting with Charlie Adam's free-kick at the back post but seeing his shot blocked by Ben Foster.
It seemed Blackpool had settled, but then an error by Crainey led to the visitors taking the lead.
Under little apparent pressure, Crainey inadvertently laid the ball straight to Hleb on the edge of the box, and he gleefully took advantage by beating Richard Kingson.
The Seasiders almost hit back straight away, with Phillips getting on the end of Adam's free-kick but only able to provide a glancing contact that sent the ball wide.
Jerome then cracked a shot at Kingson just before the break which the Ghanaian palmed away.
Blackpool emerged from the interval looking determined to find an equaliser and Luke Varney unleashed an effort that cleared the bar five minutes after the restart.
Adam's curling shot from distance then drew a diving save out of Foster with Varney lifting the follow-up over the bar, and Phillips had a low drive blocked.
McLeish brought on Sebastian Larsson for Keith Fahey before Blackpool broke away again, Adam squaring to Campbell, who was off-balance as he shot towards Foster.
The momentum was with the hosts, but Blues then nearly made it 2-0 as Jerome dinked the ball over Kingson only to be denied by the post.
Larsson also struck the upright with a free-kick soon after, but moments later, the Seasiders were level.
Taylor-Fletcher provided a knock-down from Eardley's cross and Campbell was there to volley past Foster for his fourth goal in four games.
Tangerines boss Ian Holloway withdrew Phillips and Taylor-Fletcher for Brett Ormerod and Jason Euell and the home supporters cried out for a penalty as Ridgewell challenged Varney in the box, but referee Jon Moss waved play on.
Blackpool's substitutes were swiftly in the thick of the action as Euell volleyed at Foster before Ormerod saw his effort saved by the England stopper.
Adam then got the ball beyond Foster with an angled shot, but it came back off the far post.
Birmingham appeared to have held on for a point, but right at the death, they snatched all three.
Roger Johnson rose in the box to head down substitute Jean Beausejour's delivery and Dann fired the ball in, with Kingson's appeals for offside proving futile.
Alex McLeish was pleased after watching his side pick up their first away win of the season with a 2-1 success over Blackpool on Tuesday.
"I am delighted to win the game first and foremost,'' McLeish. "I suppose people will stop asking about the away record now, although they might be asking me about it only being one (away win) in six months time. But it is three valuable points and that is the main thing.''
"The players themselves know they played extremely well in the first half and that they didn't do so well in the second half, but there is obviously a big psychological effect when you find yourself at the bottom of the table."
The Scot believes his team created enough opportunities to win the game, and he admitted the players looked anxious in the closing stages.
"Sometimes people can be a little bit uptight and apprehensive and that was a little bit evident in the second half - although I felt we had enough chances in us to have had a bit of daylight before Blackpool came back into it.''