Gloucestershire 196 for 5 (Hammond 42, Gregory 3-34) beat Somerset 194 for 6 (Banton 77*, Green 47) by five wickets
Somerset reached 58 for two in the six-over powerplay after losing the toss, seeing Will Smeed depart to a catch at cover off David Payne and Tom Kohler-Cadmore caught at mid-off for 22 in the fifth over, bowled by Shaw.
Banton was dropped on 11, 12 and 20, Gloucestershire skipper Jack Taylor twice spilling chances at mid-off and Ollie Price failing to hold onto an opportunity at fine-leg.
Even so, the visitors continued to take wickets, Marchant de Lange producing three sharp overs. Boundaries dried up, and at 148 for 5 at the end of the 18th over, with Tom Abell, Sean Dickson, and Lewis Gregory dismissed cheaply, Somerset looked short of a competitive total.
That changed when Payne went for 14 off the 19th and more so when Green smacked 6,4,4,2 off the first four balls of the final over, sent down by Shaw. Two of the deliveries were above waist high on the full and resulted in no-balls, as well as the umpires ordering the seamer out of the attack.
Off-spinner Price was asked to bowl the last four deliveries of the innings and Green collected another four and a six before holing out to wide long-on. Banton had played a key role and Somerset ended their innings with momentum.
Cameron Bancroft fell for a five-ball duck at the start of Gloucestershire’s reply, caught at mid-off off Gregory. But by the end of the powerplay, the visitors had raced to 55 for one, James Bracey having hit Riley Meredith for three successive fours and Hammond looking in fine touch.
The pair had added 66 in 5.2 overs when Hammond skyed a catch to long-on off Roelof van der Merwe, having hit the previous delivery for six. Bracey, on 31, followed in the next over, miscuing a catch to point to give Gregory a second wicket.
Taylor and Webster then kept Gloucestershire on course for victory with sensible cricket before taking 20 off the 15th over, bowled by Jake Ball. Their stand of 65 in 6.1 overs ended when Taylor skyed a catch off Josh Davey with 44 needed from 27 balls.
Webster fell to brilliant catch by wicketkeeper Banton off Gregory at the start of the 18th over, the Somerset skipper becoming their leading all-time wicket-taker in T20 cricket, before back-to-back boundaries from Price left Gloucestershire needing 21 off two overs.
With Meredith off the field due to a back spasm and unable to send down his last two overs, it fell to Green to bowl at the death and both Price and Charlesworth smashed sixes to seal a remarkable victory.