With the visitors dreaming of their first away day triumph since they defeated the Dragons in April 2008 replacement Duncan Weir had the chance to pinch the win only to see his drop goal drift wide.
Glasgow looked set to continue Connacht's travel sickness after stretching to an 8-0 lead inside the first ten minutes thanks to a Ruraidh Jackson penalty and a try from centre Graeme Morrison.
The Irish side were left to rely on the set-piece but with Keatley near perfection with the boot it was a tactic that brought great dividends.
The 23-year-old fly-half landed two penalties in five minutes to drag Connacht back into the contest before winger Fionn Carr bombed over for a try just before the interval.
Keatley converted before adding a penalty but Glasgow roared back into contention thanks to three scores from the boot of Jackson.
But they could find no answer to the impressive Keatley's penalty in the 75th minute and once Weir kicked wide the game - and Connacht's drought - was up.