Alex Dombrandt scored two tries as Harlequins claimed a bonus-point win at Gloucester despite playing most of the second half with 14 men.
Andre Esterhuizen was sent off for elbowing Lloyd Evans soon after the restart but Quins still scored twice through Nathan Earle and Dombrandt.
Dombrandt had earlier opened the scoring before James Chisholm's try.
Gloucester had been level after Ed Slater's first-half try but James Hanson's two tries came too late.
The Cherry and Whites trailed 17-10 when Esterhuizen's dismissal handed the home side a huge advantage, the centre dropping an elbow into Evans' face for no obvious reason with the pair harmlessly tangled on the floor.
From the subsequent Gloucester attacks, Glen Young was sin-binned for pulling down a maul but Quins held out with 13 men.
Earle then extended the lead, gathering Marcus Smith's perfectly-weighted kick over the defence and despite the Television Match Official asking referee Ian Tempest to check what he advised was offside against Earle, Tempest decided the television picture was too tight to overturn his on-field decision.
There was also a suspicion of offside about Quins' fourth try as number eight Dombrandt appeared to be ahead of Smith as he launched an up-and-under that fell for Luke Northcote, who passed for Dombrandt to run into the left corner.
Gloucester rallied with Hanson's tries via driving mauls but the deficit was too great and the 2,000 fans allowed back at Kingsholm left disappointed.
Gloucester: Moyle; Thorley, Twelvetrees, Atkinson, Seabrook; Evans, Simpson; Ford-Robinson, Singleton, Stanley, Slater, Craig, Reid, Ludlow (capt), Ackermann.
Replacements: Hanson, Saville, Knight, Atkins, Gibson, Flinn, Trinder, Morris
Harlequins: Ashton; Earle, Northmore, Esterhuizen, Murley; Smith, Care; Botta, Baldwin, Louw, Tizard, Young, Chisholm, Evans, Dombrandt (capt).
Replacements: Elia, Els, Kerrod, Hammond, Lawday, Steele, Green, Lasike.
Referee: Ian Tempest (RFU).