Two tries in the final five minutes from Gloucester saw the Cherry-and-Whites to a 31-29 win over Harlequins in the LV= Cup on Sunday.
Gloucester, needing a bonus-point victory to edge out Welsh side Scarlets at the top of Pool Two, looked down and out when they trailed 20-0 after 25 minutes.
But they scored five tries in a spirited comeback, finally drawing level in the 79th minute when full-back Tom Voyce drove in from close range for their final touchdown.
It all hinged on the conversion and Taylor stroked it between the posts to take his tally for the match to 11 points and sink a Harlequins side who required an improbable 11-try win to edge ahead of Cardiff Blues in Pool Three.
Nick Evans, Quins' former All Blacks fly-half, looked to have put his side on the way to victory with a 24-point haul - two tries, a conversion and four penalties.
He rocked Gloucester with an excellent pair of first-half tries but his three second-half penalties proved insufficient to keep determined Gloucester at bay.
After Taylor missed a first-minute penalty for Gloucester, Evans struck the first blow four minutes later when Gloucester were caught offside in front of their own posts.
But Harlequins were chasing tries and, two minutes later, they were rewarded after Evans kicked for touch instead of going for goal,
From the resulting lineout, hooker Matt Cairns was stopped just short of the Gloucester line but the Quins pack drove lock James Percival over for the opening try, converted by Evans.
The former All Black scored his side's second, jinking round two Gloucester defenders for an exquisite solo try. This time his conversion rebounded from the upright.
Gloucester, 15-0 down after 12 minutes, suffered another blow four minutes later when the latest in a series of infringements at the breakdown resulted in referee Sean Davey despatching hooker Darren Dawidiuk to the sin bin.
With the visitors reduced to 14 men, Harlequins struck again.
Number eight Tom Guest grabbed the ball from the base of a powerful scrum, created the space to release scrum-half Karl Dickson and he made 40 metres before passing inside for Evans, who ran diagonally before diving over in the left-hand corner.
Gloucester replied with a 31st-minute try involving three former England wingers Lesley Vainikolo, Voyce and James Simpson-Daniel.
Vainikolo, playing in the centre, launched the move with a powerful surge at the Quins defence, Voyce supplied the final pass and Simpson-Daniel crashed through opposing winger Ross Chisholm's tackle to touch down.
Poor defensive play by Harlequins enabled Gloucester to score again six minutes later when Taylor, missed by Lewis Stevenson, scythed through to touch down behind the posts.
With the fly-half converting both tries, Gloucester had cut the deficit to six points by the interval, but Evans landed a penalty for Quins three minutes into the second half.
Harlequins were temporarily reduced to 14 men when recently-signed Argentinian lock Thomas Vallejos was yellow-carded only seven minutes into his debut after being introduced as a second-half replacement for Stevenson.
Gloucester should have scored a third try when they pushed the depleted Harlequins pack back over their own line, but replacement hooker Oliver Azam, who had replaced Dawidiuk only two minutes earlier, lost possession.
But the visitors scored their third try in the 63rd minute with Voyce, who burst down the right before being hauled down by Quins full-back Mike Brown, flicking the ball up for Simpson-Daniel to finish.
In a grandstand finale, centre Tim Molenaar grabbed Gloucester's fourth try five minutes from time to set up the dramatic conclusion.
Tries: Evans 2, Percival
Pens: Evans 4
Tries: Simpson-Daniel 2, Taylor, Molenaar, Voyce
Cons: Taylor 3
Harlequins:15 Mike Brown (c), 14 George Lowe, 13 Gonzalo Tiesi, 12 Jordan Turner-Hall, 11 Josh Drauniniu, 10 Nick Evans, 9 Karl Dickson, 8 Tom Guest, 7 Neil McMillan, 6 Chris York, 5 Lewis Stevenson, 4 James Percival, 3 John Andress, 2 Matt Cairns, 1 Ceri Jones.
Replacements:16 Chris Brooker, 17 Aston Croall, 18 James Johnston, 19 Tomas Vallejos, 20 Luke Wallace, 21 Steve So'oialo, 22 Waisea Luveniyali, 23 Ross Chisholm.
Gloucester:15 Charlie Sharples, 14 Tom Voyce, 13 Tim Molenaar, 12 Lesley Vainikolo, 11 Semi Tadulala, 10 Tim Taylor, 9 Dave Lewis, 8 Luke Narraway (c), 7 Andrew Hazell, 6 Peter Buxton, 5 Will James, 4 Adam Eustace, 3 Rupert Harden, 2 Darren Dawidiuk, 1 Pierre Capdevielle.
Replacements:16 Olivier Azam, 17 Yann Thomas, 18 Greg Somerville, 19 Alex Brown, 20 Apo Satala, 21 Andy Williams, 22 Nicky Robinson, 23 James Simpson-Daniel
Referee: Sean Davey