The visitors had established a 13 point lead through a Chris Ashton try and two penalties and a conversion from the boot of Geraghty.
Quins roared back with Nick Evans threading two penalties between the Northampton posts before George Lowe capitalised on Danny Care's break to cross the whitewash.
But Hartley finished off a well-worked line-out and Joe Marler was denied a Quins response when Ben Foden was judged to have held him up over the line.
Nick Abendanon, who has long been tipped for a place in the England team, did his selection chances no harm with a try in Bath's 20-13 defeat of 14-man London Irish.
After an exchange of penalties Jonathan Joseph crossed in the corner with just ten minutes of the game remaining only for Abendanon's try and Olly Barkley's penalty to take Bath top of the table with the win.
Gloucester were grateful for a Nicky Robinson penalty two minutes from the end to save their blushes in a 22-21 win over Leeds.
After going down 22-10 to new boys Exeter last week, the Cherry and Whites looked set to be undone again after tries from Christian Lewis-Pratt and Luther Burrell put Leeds in front.
But the hosts, who had led 19-11 at the break thanks to scores from Luke Narraway, Alasdair Dickinson and Eliota Fuimaono-Sapolu, hit back to win with Robinson's penalty.
Finally Leicester came from behind to beat Exeter 37-27 thanks to tries from Scott Hamilton, Dan Hipkiss and a penalty score.
The newly promoted visitors looked set to make it two wins on the bounce after two Phil Dollman tries had them ten points clear before the hosts hit back.