England scrum-half Danny Care was one of three try scorers for Harlequins as they saw off the late threat of Gloucester at The Stoop.
The hosts, who were celebrating 50 years since their first game at The Stoop, triumphed 27-19 and took the lead the lead just a minute in, as Gloucester gave away a penalty from kick off.
Nigel Davies's men hit back in spectacular style, as hooker Huia Edmonds made a break from the back of a rolling maul to play in Billy Twelvetrees, on his return from international action with England, who crossed to give the visitors the lead.
Freddie Burns missed his conversion, which allowed Nick Evans to sneak Quins back into the lead with penalty on the 15-minute mark.
After Jimmy Cowan was sent to the sin bin, Conor O'Shea's side profited from their one man advantage, as Nick Easter scored after a strong rolling maul.
It got even worse for the Gloucester soon after, as Care's skilful run put himself in under the posts, as Quins took a 15-point lead into the break.
Gloucester were their own worst enemy again after half time, as seconds after captain Tom Savage was sent to the bin, Harlequins were over for their third try. Luke Wallace touched down from another rolling maul to give Quins the perfect start to the second period. Evans's conversion extended the lead once more.
Martyn Thomas then became the third player to be sent to the sin bin. With two men off the field, Gloucester somehow managed to score their second try of the game through winger Jonny May, who raced away to give the visitors a glimmer of hope.
Tom Williams thought he had secured a bonus point for Quins, only the score to be chalked off by TMO Roy Maybank for a forward pass. He was in action again five minutes from the end, as he awarded Twelvetrees his second score of the game, as Burns' chip was picked up by the big centre to reduce Harlequins' lead to eight.
Despite missing out on the bonus point, Harlequins were good value for their victory, as Gloucester's indiscipline cost them dear while their troubling start to the season continues.
Tries: Easter, Care, Wallace
Cons: Evans 3
Pens: Evans 2
Yellow Card: Robson
Tries: Twelvetrees 2, May
Cons: Burns 2
Yellow Cards: Cowan, Savage, Thomas
Harlequins: 15 Mike Brown, 14 Tom Williams, 13 Matt Hopper, 12 Tom Casson, 11 Ugo Monye, 10 Nick Evans, 9 Danny Care, 8 Tom Guest, 7 Chris Robshaw (c), 6 Maurie Fa'asavalu, 5 George Robson, 4 Nick Easter (c), 3 Will Collier, 2 Dave Ward, 1 Joe Marler.
Replacements: 16 Harry Allen, 17 Mark Lambert, 18 Nic Mayhew, 19 Charlie Matthews, 20 George Merrick, 21 Sam Stuart, 22 Ben Botica, 23 Charlie Walker.
Gloucester: 15 Rob Cook, 14 Charlie Sharples, 13 Mike Tindall, 12 Billy Twelvetrees, 11 Jonny May, 10 Freddie Burns, 9 Jimmy Cowan, 8 Ben Morgan, 7 Matt Kvesic, 6 Tom Savage (c), 5 James Hudson, 4 Elliott Stooke, 3 Shaun Knight, 2 Huia Edmonds, 1 Nick Wood.
Replacements: 16 Darren Dawidiuk, 17 Yann Thomas, 18 Rupert Harden, 19 Will James, 20 Matt Cox, 21 Dan Robson, 22 Billy Burns, 23 Martyn Thomas.
Referee: Matthew Carley
Assistant referees: Andy Watson, Gareth Copsey
Timekeeper: Laurie Bryant
Television match official: Roy Maybank