New Zealand international Nick Evans was the main thorn in Gloucester's side as the fly half helped himself to 21 points in an ultimately losing cause.
However, just as significant was the role of the referee as both Gloucester's starting props were sent to the sin bin in a frantic second half while a number of other decisions seemed to have Gloucester scratching their collective heads in bewilderment.
For Gloucester to get themselves together and secure the win having been pegged back by a persistent Quins outfit showed great mental fortitude especially after Bryan Redpath's side had played some sensational rugby to all but blow Quins away in the first period.
Gloucester's pack seemed to have their counterparts on toast in the first half and, any ball moved wide particularly in the direction of Charlie Sharples, had alarm bells ringing in the Quins defence.
Kudos to the visitors who looked second best by quite some margin in the first half but proved what class they have as they simply refused to let Gloucester run away with it.
Once the dust has settled, however, Gloucester have the four points and move into fourth place in the Aviva Premiership table with Leicester the next visitors to Kingsholm next weekend.
Gloucester's preparations were affected by two late withdrawals as Jim Hamilton (ankle) and Andy Hazell (illness) were forced to pull out to be replaced by Dave Attwood and Luke Narraway respectively.
It was a fairly muted start as both sides settled into the game and Gloucester's first scoring opportunity was gifted to them as the Quins back three misplayed a long kick downfield.
Gloucester took full advantage of the territorial gain and forced a penalty at the breakdown which Robinson slotted for a 3-0 lead after six minutes.
However, controversy then struck with Gloucester on the attack. A Quins hand seemed to drag the ball back from a Gloucester ruck and the ball squirted onto the blindside where Danny Care gathered and sprinted home from fully 60 metres. Evans converted to silence the crowd.
Gloucester needed to settle and a cute kick through from Nicky Robinson almost caught the visitors napping after a good break from Scott Lawson but Gonzalo Camacho just gathered the loose ball.
Gloucester had the 5m scrum and a powerful surge had the Quins front row popping up. Gloucester opted to scrum again and the pack got a good enough nudge on for Dave Lewis to burrow over from close range. Robinson converted for 10-7.
However, it was all square minutes later as Gloucester were penalised at the breakdown and Nick Evans booted a penalty from halfway for 10 all on 20 minutes.
A thrilling attack involving Sharples and Robinson the almost took Gloucester all the way from well inside their own half but a despairing Harlequins hand got in the way of what looked to be a scoring pass floated inside from the flying right winger.
Gloucester kept the pressure on and, once again, forced a penalty at scrum time and Robinson did the rest for 13-10 after 27 minutes.
And the crowd were again brought to life moments later as Sharples again burned Quins with his pace. Narraway showed great hands to link with him but the cover just got Sharples into touch near the flag.
Quins couldn't clear and Gloucester ran the kick back dangerously into the 22 forcing the visitors against to concede the three points via Robinson's penalty.
Gloucester were producing some of their best rugby of the season and Quins couldn't live with it. For the third time, Sharples was given some room to run after a scintillating Gloucester break from inside their own 22 and this time no-one could stop him. Robinson made it five from five with the boot for 23-10.
Quins looked like a side who needed to hear the half time whistle but were able to end the half on the attack and earned a penalty which Evans slotted to make the half time score 23-13.
Some of the rugby that Gloucester had produced in the first period had been sublime with Harlequins reduced to chasing shadows. On another day, Charlie Sharples would have had a hat trick by now.
The controversial Danny Care try apart, Quins had offered little but, with the obvious class dotted around their side, they would always be a threat after the break until Gloucester killed the game off.
Skipper Mike Tindall started the second period off in fine style, climbing imperiously to claim a high ball. Olly Morgan did likewise moments later, Quins were penalised at the ruck and Robinson kicked his fourth penalty of the afternoon.
Quins were doing their best but looked aimless in attack and the Gloucester defence was in no mood to give them anything. In contrast, Lewis and Robinson were mixing it up well and keeping their side moving forward.
In fact, Gloucester's first setbacks both occurred on 50 minutes as Alasdair Strokosch was helped off the pitch with what appeared to be an ankle injury while Paul Doran-Jones was sinbinned for fighting with Gloucester in a great position.
Moments later, Quins struck. Evans took a flat pass at pace from quick lineout ball, stepped the first man and then just made the line despite Olly Morgan's tackle. Evans converted and Quins were back in the game at 26-20.
Gloucester were getting little out of the referee at this point and, as a result, the visitors were getting vital possession and clawing their way back into the game.
When Nick Wood was also yellow carded on 59 minutes for taking the jumper out at a lineout, the crowd was in uproar but Evans kept his cool to make it 26-23.
The momentum was now well and truly with the visitors and, when their pack forced another penalty against a seven man Gloucester scrum, Evans levelled the score with 12 minutes to play.
With the tension growing, Robinson was just off target with a snap drop goal while Quins seemed to be trying to play for a penalty, keeping the ball tight around the fringes.
Now fully restored to 5 men, Gloucester had a chance with four minutes to go as Trinder's chip ahead forced Quins to carry the ball over their own line.
The Gloucester pack somehow found reserves of energy and pummelled their way over for Brett Deacon to touch down. Robinson showed nerves of steel to convert.
There was still time for drama. Tindall failed to gather the restart to give Quins vital possession. Keeping the ball alive through multiple phases, they remained patient and seemed to have driven over the Gloucester line.
However, referee Wigglesworth signalled for full time and Gloucester had the win.
|Gloucester Rugby Score Card|
|Harlequins Score Card|