The west-country side scraped into the T20 Blast last eight only on net run rate, finishing fourth in the South Group, but will now face Sussex in the semi-final back on this ground on Saturday week
Edgbaston: Gloucestershire 138, Birmingham Bears 124-9 - Gloucestershire win by 14 runs
Birmingham Bears suffered a fourth consecutive quarter-final exit as Gloucestershire stunned the North Group winners with a 14-run victory in a tense, low-scoring contest at Edgbaston.
The west-country side scraped into the last eight of the T20 Blast only on net run rate, finishing fourth in the South Group, but will now face Sussex in the semi-final back on this ground on Saturday week.
Gloucestershire had looked well under par, racing to 51 without loss from five overs after being put in only to be bowled out for just 138.
Analysis: Gloucestershire turn to clinical bowlers and priceless spirit to seal Finals Day opportunity
But as left-arm quick David Payne took 4 for 23, including two as he defended 18 but conceded just three in the final over, and spinner Ollie Price 3 for 32, the Bears could muster only 124 for 9 in reply, Chris Benjamin's 33 a paltry top score.
Cameron Bancroft had top-scored for Gloucestershire with 43 in 35 balls and opening partner Miles Hammond 30 from 24 but no one else bettering Jack Taylor's 19.
The Bears' New Zealand seamer Zak Foulkes took 3 for 22, spinners Danny Briggs and Dan Mousley picking up two wickets each and George Garton executing two magnificent runouts with direct hits.
Needing to score at just under seven-an-over, the Bears were 37 for 2 in the powerplay, 17 behind their opponents at the corresponding point and with one fewer wickets in hand.
Quarter Finals: Depleted Northamptonshire run out of steam as Somerset show their teeth
Gloucstershire successfully defended 138 (Nathan Stirk/Getty Images)
Payne, who opened with a maiden, had Alex Davies caught on the square leg boundary and struck a major blow to the home side when Moeen Ali was out for 27. Payne had conceded 16 of those himself as the England man hit him for six, four and six but the next ball found the outside edge and James Bracey took the catch.
Like their counterparts in the first innings, the Bears struggled to regain their momentum, losing Mousley leg before in an attempted pull and Jacob Bethell caught at extra cover, both wickets falling to Ollie Price, leaving them 59 for 4 in the ninth. That became 74 for 5 in the 13th as Price's off-spin claimed its third victim, Sam Hain unleashing a towering hit on the legside but failing to clear Hammond on the mid-wicket boundary.
Chris Benjamin hammered six off Tom Smith and Garton took two fours off Price to ease the pressure but then Josh Shaw ramped it up again with two wickets in two balls as Garton holed out to long off and Foulkes perished leg before.
It all came down to 18 required off the last six balls, with Gloucestershire pace man and leading wicket-taker Payne coming out on top, conceding just three and adding the wickets of Benjamin and Jake Lintott for good measure as Price and Bancroft held catches in the deep.
Join The Cricketer's brand new Whatsapp channel for the latest breaking news, comment and features - click here to become a member