Gloucester maintained their push for a Gallagher Premiership play-off place after beating Wasps 27-14 at Kingsholm.
Wasps have won just two of their last 14 games in all competitions, and their play-off hopes effectively evaporated despite a promising start that saw them lead through wing Marcus Watson's try and two Rob Miller penalties.
Miller booted a third penalty 17 minutes from time, and Wasps' England back Elliot Daly sent a long-range kick well wide as Gloucester had to dig deep.
But a late Twelvetrees penalty and Jake Polledri touchdown that Twelvetrees converted ensured victory.
And they remain firmly on course for a first play-off appearance since 2011, holding a top-four spot with just five league games remaining.
Gloucester showed one change from the side that beat Harlequins a fortnight ago, with hooker Franco Marais starting.
But Wasps, who welcomed back their England internationals from Six Nations duty, were forced into a late switch as hooker Tommy Taylor was ruled out due to a back spasm and Tom Cruse replaced him.
Miller kicked Wasps into an early lead, but Gloucester were quickly into their rhythm, with Danny Cipriani mixing his game well and almost creating a try for wing Ollie Thorley after a clever chip into space.
Wasps absorbed the pressure, though, and they stung Gloucester with a 16th-minute try that was set up by England back-row forward Nathan Hughes' charge.
Gloucester could not clear their lines, and full-back Willie Le Roux's long pass found Watson, who crushed off Thorley's challenge for a well-worked try.
Miller missed the conversion, but he booted a second penalty two minutes later and Gloucester trailed 11-0 inside the opening quarter.
Gloucester full-back Jason Woodward then limped off, and his replacement Charlie Sharples provided an immediate attacking spark, testing Wasps' defence through his pace in wide channels.
And the home side wiped out their deficit in scintillating fashion, claiming two tries during three minutes just before half-time.
Scrum-half Heinz scored the first, rounding off impressive approach work by wing Tom Marshall, then Thorley broke several tackles before he was hauled down just short of the line, and Ackermann finished off.
Twelvetrees converted both touchdowns, and Gloucester had turned things their way, leading 14-11 at the interval.
A Twelvetrees penalty nudged Gloucester further ahead after Thorley went off injured, and there were clear signs of the home forwards establishing dominance as they looked to turn the screw.
They were not helped, though, when lock Franco Mostert was sin-binned for a challenge on Hughes, meaning that Gloucester entered the final 20 minutes a man down before Miller completed his penalty hat-trick.
Wasps dominated while Mostert was off, and his return coincided with Gloucester gaining a scrum penalty on halfway that Cipriani gratefully spent spiralling into touch inside the visitors' 22.
It was just the territorial position that Gloucester required, and Twelvetrees kicked a match-clinching penalty, leaving Wasps with not even scant consolation of a losing bonus point as Polledri touched down in the 80th minute, with Twelvetrees converting.