A neatly-taken drop goal from Rory Clegg, adding to his haul of six penalties from seven attempts, had put the Warriors on the cusp of victory.
Keatley had the final say for the Irish province three minutes from time.
Dave O'Callaghan crossed for the only try of the first half, with BJ Botha touching down after the interval.
Anthony Foley's men went in at the break leading 13-9, with young flanker O'Callaghan crossing the whitewash while his opposite number Tyrone Holmes was in the sin-bin for collapsing a maul five metres out.
CJ Stander and Mark Chisholm burrowed up close before O'Callaghan reached over for a simple try.
Clegg's reliable right boot kept Glasgow in touch and he added three more penalties to put his side 18-13 ahead after 66 minutes.
However, Botha scored his first try in over two years, converted by Keatley, and Munster's greater experience ultimately told in a real grandstand finish.
Dave Kilcoyne's ball-carrying grunt was in full effect as Munster went the direct route, chipping away at the Glasgow defence during a 20-phase attack that finished with prop Botha piling over to the right of the posts in the 66th minute.
Keatley's conversion was cancelled out eight minutes later when Mike Blair fed Clegg for a well-struck drop goal and a 21-20 advantage.
However, Glasgow were punished for going offside by Keatley's penalty and James Eddie's yellow card for taking Andrew Conway out in the air signalled the end for the Scots.
TEAMS
Munster: Felix Jones (capt), Andrew Conway, David Johnston, Tyler Bleyendaal, Gerhard van den Heever, Ian Keatley, Duncan Williams, James Cronin, Duncan Casey, Stephen Archer, Mark Chisholm, Dave Foley, Dave O'Callaghan, Jack O'Donoghue, CJ Stander.
Replacements: Mike Sherry, Dave Kilcoyne, BJ Botha, Robin Copeland, Jordan Coghlan, Cathal Sheridan, Rory Scannell, Shane Monahan.
Glasgow Warriors: Rory Hughes, Junior Bulumakau, Hugh Blake, Fraser Lyle, Lee Jones, Rory Clegg, Grayson Hart, Alex Allan, Pat MacArthur, D'arcy Rae, Rob Harley (capt), Scott Cummings, Tyrone Holmes, Chris Fusaro, Adam Ashe.
Replacements: Fergus Scott, Jerry Yanuyanutawa, Zander Fagerson, Kieran Low, James Eddie, Mike Blair, Gregor Hunter, Robbie Fergusson.
Ian Keatley landed a decisive penalty as Munster kept up their unbeaten start to the Pro12 season by edging out champions Glasgow at Thomond Park.