© PA Photos
Both sides swapped tries and penalties to go into the break level at 16 points apiece.
Care was heavily involved at the start of the second half as Quins took the lead when Tom Williams crossed the line after a brilliant breakaway move.
Irish continued to press hard and chipped away at Quins' lead thanks to the boot of Humphreys, who kicked six penalties to give the home side a narrow advantage going into the closing stages.
With just seconds remaining Quins crossed the line when Tom Casson mishandled after an incisive inside pass before touching the ball down with his chest.
Confusion reigned before video referee Graham Hughes awarded Quins the try and a vital victory which sends the reigning champions back to the top of the Aviva Premiership.