Hampshire147 for 4 (Vince 48*, Rossouw 42) beat Gloucestershire 144 for 8 (Klinger 43, Wood 4-16) by six wickets
James Vince and Sam Northeast's 66-run stand coupled with four miserly wickets for Chris Wood prevented Gloucestershire from securing a home Vitality Blast quarter-final as Hampshire recorded just their second success in the competition.
Gloucestershire, who had already qualified for the knockout stages, needed to beat Hampshire and hope Kent lost to Essex elsewhere to play at Bristol again in the tournament.
But Vince and Northeast carefully teed up the six-wicket win, with Rilee Rossouw crashing 42 and Wood taking an exceptional 4 for 16.
Hampshire had only managed a single victory in their opening 13 South Group matches but saved their best performance until last, and it started with Vince winning the toss and elected to bowl on a slow wicket under clear skies.
Miles Hammond scooped the game's first six off Dale Steyn in the second over but departed when Wood picked up his first of a tidy haul - Calvin Dickinson taking a good catch at the second attempt at point.
Hampshire's catching roadshow continued as Sam Northeast brilliantly grabbed a firm pull shot from Ian Cockbain at mid-wicket - Gloucestershire struggling to 29 for 2 off the Powerplay.
Benny Howell upped the ante with a quick-fire 26 off 15 balls, including tonking Liam Dawson and Ryan Stevenson for huge maximums over deep mid-wicket and long on.
The former Hampshire all-rounder rode his luck when Dawson dropped a caught and bowled chance, but he was snatched when hoicking the left-arm spinner to deep mid-wicket.
Kieran Noema-Barnett was forced to retire after appearing to pull a muscle in his right thigh before Jack Taylor was bowled.
Gloucestershire's leading scorer Michael Klinger had quietly kept the scoreboard tricking as he took his Group Stage total to 407 runs.
The skipper had been dropped on 17 by Stevenson, in his follow through, and eventually departed for an adhesive 42 when the fast bowler castled him.
Ryan Higgins smashed 31 from 16 deliveries to send the visitors up to an average par 144 - with Gareth Roderick, Andrew Tye and Higgins all departing to Wood.
Chasing, Dickinson was given his first appearance of the season, having missed out on previous matches with concussion - but only lasted four balls before he was bowled by David Payne as he tried to give himself room to hit over the offside.
Opener Rossouw and Northeast rebuilt with a 58-run stand, with the former the ultra-aggressor, in particular taking to Higgins as he dispatched him for a quartet of boundaries.
The South African fell for an entertaining 42 off 18 before Howell clattered into the stumps.
Vince joined Northeast with the required run-rate comfortably in check, and took little risks scoring 44 not out and 42 respectively.
Vince was dropped chipping to long-on while on 32, before Payne broke the partnership when Northeast edged behind and Dawson skied into the leg-side.
But Hampshire strolled home with 20 balls to spare to avoid equalling their worst ever Twenty20 campaign.