Leeds were dominant in the first half and took an 11th-minute lead with a 20-yard drive from Dallas that nestled into the bottom left corner.
Dallas then doubled the Whites lead with a superb volley from simlar range five minutes after the break but Birmingham immediately pulled a goal back when David Cotterill’s powerful free-kick was parried by Marco Silvestri to Clayton Donaldson who buried the rebound.
United then had to sustain a barrage of Blues pressure but held on for all three points but not before Alex Mowatt was shown a straight red card for a late challenge on Ryan Shotton.
Whites head coach Steve Evans made one change to the starting XI that lost 1-0 at Burnley with striker Mirco Antenucci replacing winger Mustapha Carayol.
The Blues line up featured on loan Norwich City striker Kyle Lafferty who Leeds continually pursued for so much of the season.
But neither side showed any sort of attacking prowess in the opening stages with Mirco Antenucci’s shot from the edge of the area that went well wide the only effort to speak of inside the first ten minutes.
Leeds, though, had a fine chance to take the lead one minute later when Gatenao Berardi produced a fine cross from the right flank which a sliding Chris Wood failed to connect with.
But just one minute later United took the lead when Dallas produced a goal from nothing 20 yards out.
The winger picked up possession towards the edge of the area on the right flank and sized up a low effort that beat Adam Legzdins all ends up and squeezed into the bottom left corner.
The anticipated Birmingham response failed to arrive and United were presented with another chance four minutes later when Charlie Taylor’s left flank cross picked out Lewis Cook whose goal-bound effort was blocked.
Leeds continued to dominate with Luke Murphy’s effort blocked and Toumani Diagouraga heading over as United regularly poured forward.
The Whites looked to be cruising and when Berardi was booked for a late foul out wide, Birmingham were unable to do anything with the free-kick.
The Blues began to turn the screw slightly as half-time approached with a 38th-minute corner causing a mad scramble after Shotton had fired wide before being fouled amid home claims for a penalty.
From another corner, Jonathan Grounds blazed over the crossbar as home pressure began to build but Leeds then squandered a fantastic chance to double their lead in the 44th minute.
Superb play from Chris Wood in the centre-circle saw the striker control the ball instantly and turn his man before releasing Cook to race clear on the left flank.
Cook had the option to square the ball to Antenucci at the far post but produced a rasping low drive which required Legzdins to make a fine save.
Birmingham quickly countered with a low Lafferty effort easily saved and that proved the last effort of the half.
The Blues clearly received a rocket at half-time as they started the second period in much brighter fashion with Shotton’s effort saved from the first of two early corners.
But United then bagged the second goal that their performance deserved when Dallas controlled the ball with a clever flick outside the area but this time central and produced a dipping volley that powered into the bottom left corner.
United looked to be cruising to victory but just three minutes later Birmingham pulled a goal back when Cotterill’s rasping free-kick was parried away by Silvestri but only to Donaldson who scrambled home the rebound.
But just one minute later Leeds nearly had their third goal when Sol Bamba narrowly failed to convert a Dallas inswinging corner.
Cue a further barrage of Birmingham pressure which led to Cook having to make a goal-line clearance to keep out a Grounds header from a 67th-minute corner.
Silvestri was then required to make a double save to keep out two efforts from Lafferty, the first of which was particularly testing.
And Blues substitute Diego Fabbrini then missed a sitter with ten minutes left when blazing over from just six yards out after more excellent work by Lafferty.
At the other end, Whites sub Mowatt fired over and the stage was then set for Lafferty who was presented with an injury time free-kick on the edge of the area which the striker hammered over and into the stands.
A counter-attacking Donaldson was then denied by Silvestri but Leeds looked to be seeing out four minutes of added time without too much concern until Mowatt was shown a straight red card for a late tackle on the touchline.
The inswinging free-kick caused bedlam in the United area as Silvestri punched clear but the final whistle brought a thrilling game to a conclusion after six minutes of injury time.
Birmingham City: Legzdins, Caddis, Morrison, Shotton, Grounds, Gleeson (Toral 60), Davis, Kieftenbeld, Cotterill (Fabbrini 76), Donaldson, Lafferty. Subs not used: Kuszczak, Vaughan, Solomon-Otabor, Maghoma, Spector.
Leeds United: Silvestri, Berardi, Bamba, Cooper, Taylor, Diagouraga, Murphy (Bellusci 88), Cook, Dallas (Carayol 82), Antenucci (Mowatt 68), Wood. Subs not used: Peacock-Farrell, Coyle, Adeyemi, Phillips.
Referee: Chris Kavanagh (Lancashire).