Harlequins held off a late Gloucester fightback to win 28-24 in their Premiership fixture played out in front of 77,567 at Twickenham on Tuesday.
Joe Marchant touched down twice as Harlequins kept their play-off hopes alive.
The first-half proved to be a slow burner, but the final 12 minutes of that period did see 14 points scored. Most of those came from Quins who went into the break 11-3 up thanks to Marchant's try and two Ruaridh Jackson three-pointers.
Greig Laidlaw's penalty kept the Cherry and Whites in contention but they failed to build on that early in the second period as Jack Clifford moved the hosts 15 points clear.
Although Gareth Evans gave David Humphreys' men hope, Jackson's third penalty and Marchant's second effort appeared to have taken it out of the away side's reach.
They showed commendable spirit, though, and almost snatched the victory, but James Hook and Motu Matu'u tries were not enough.
Quins have been strong at home and poor away, but taking this game across the road to Twickenham for the annual Christmas encounter did not ultimately have an adverse affect. That was despite a slow start which saw Gloucester control proceedings.
The visitors went close early on via Billy Burns, but they struggled to create chances while on top. Instead, it was the Londoners that finally went into the lead after 28 minutes through Marchant, who latched onto Jackson's delayed pass.
Although Laidlaw reduced the arrears from the tee, Harlequins' fly-half added successive penalties – the second coming after Jonny May had been sin-binned – for an 11-3 lead at the break.
That almost immediately became 18-3 in the second period following Cliffords' try before the West Countrymen responded through Evans' close range burst.
The cagey opening had duly given way to a free-flowing affair and, after Jackson had made it 21-10, Marchant touched down for the second time.
It should have been the game-deciding score but Gloucester kept battling and were rewarded for their endeavour when Hook scampered across the whitewash.
Matu'u soon followed the full-back over after Clifford was yellow carded for being offside, leaving an exciting end to an absorbing second-half. However, despite late pressure, the visitors could not find the winner as Quins held on for the win.
Tries: Marchant 2, Clifford
Cons: Jackson 2
Pens: Jackson 3
Yellow Card: Clifford (71 min)
Tries: Evans, Hook, Matu'u
Cons: Laidlaw 2, Burns
Yellow Card: May (40 min)
Harlequins: 15 Mike Brown, 14 Marland Yarde, 13 Joe Marchant, 12 Jamie Roberts, 11 Tim Visser, 10 Ruaridh Jackson, 9 Danny Care (c), 8 Jack Clifford, 7 Luke Wallace, 6 James Chisholm, 5 Charlie Matthews, 4 George Merrick, 3 Kyle Sinckler, 2 Rob Buchanan, 1 Joe Marler
Replacements: 16 Dave Ward, 17 Owen Evans, 18 Will Collier, 19 Stan South, 20 George Naoupu, 21 Karl Dickson, 22 Tim Swiel, 23 Alofa Alofa
Gloucester: 15 James Hook, 14 Charlie Sharples, 13 Matt Scott, 12 Billy Twelvetrees, 11 Jonny May, 10 Billy Burns, 9 Greig Laidlaw (c), 8 Gareth Evans, 7 Jacob Rowan, 6 Ross Moriarty, 5 Mariano Galarza, 4 Tom Savage, 3 Josh Hohneck, 2 Richard Hibbard, 1 Paddy McAllister
Replacements: 16 Motu Matu’u, 17 Yann Thomas, 18 Salesi Ma’afu, 19 Jeremy Thrush, 20 Matt Kvesic, 21 Willi Heinz, 22 Andrew Symons, 23 Henry Purdy
Referee: JP Doyle
Assistant Referees: Simon McConnell, Greg Macdonald
TMO: Stuart Terheege