The result - Munster's 17th straight success on home soil in all competitions - kept Tony McGahan's men in play-off contention and provided them with a timely boost ahead of next Friday's renewal of rivalries with Leinster.
For Glasgow, who had eight players in their starting line-up who featured against Ireland six days ago, this was a bitterly disappointing defeat, but Sean Lineen's charges will still be confident of finishing in the top four with three of their final four games at home.
Defending champions Munster made a forceful start, with Mick O'Driscoll and Donncha O'Callaghan turning Ireland's nemesis Parks over in the tackle and Paul Warwick's dinked kick gave O'Gara and Ian Dowling a sniff of the try-line.
DTH van der Merwe did well to defend a subsequent cross-field kick from O'Gara but Glasgow regained their poise, helped by a powerful set piece that drove the hosts off their own ball at the first scrum.
O'Gara flashed a kickable penalty wide of the uprights, but Munster had something to show for their early territorial dominance when, on the quarter hour, Hurley dotted down in the right corner.
Centres de Villiers and Lifeimi Mafi did the damage, breaking through a couple of tackles before Dowling looped a long pass out for Hurley to get over past van der Merwe.
O'Gara's touchline conversion bounced back off the left hand post and he managed to add a penalty before Parks opened his account, bending a left-sided kick over from distance.
Munster had the advantage of an extra man when Glasgow centre Graeme Morrison was sin-binned for obstructing Dowling as he chased a 32nd minute kick.
However, O'Gara was left looking on in horror barely a minute later as his pass on the Glasgow 22 was intercepted by Barclay and the athletic flanker powered all the way to the line, avoiding Mafi's last-gasp tackle.
That lung-bursting score, converted by Parks, left Thomond Park stunned but Munster edged back ahead for half-time as O'Gara's second penalty success left the game on a knife edge at 11-10 to the home side.
Glasgow survived an early second half onslaught as the Munster forwards stepped it up a gear, and Parks punted the Scots ahead again with his second penalty.
With defences on top and Glasgow struggling to use their advantage in the scrum, Munster picked off a series of penalties - three in all from O'Gara - to move 20-13 ahead, the third coming after Glasgow replacement Kevin Tkachuk was sin-binned for a ruck offence.
Munster wobbled when flanker Niall Ronan was dispatched to the bin for a similar infringement, 13 minutes from the end, and Parks closed the gap to 20-19 with two more well-struck penalties.
But a tiring Glasgow side could produce no more and Munster put in a stronger finish, with de Villiers breaking past Max Evans on the 22 and deftly touching down in the corner, under pressure from Morrison and replacement Hefin O'Hare.
O'Gara's terrific touchline conversion took his tally to 17 points and denied the Warriors a bonus point in the process.
Speaking after the game, Munster lock Mick O'Driscoll said: "The scrums and the set piece for us are an area we just need to improve and keep working on, and these things take time and we think we're getting there.
"The Glasgow team are a very good side and denying them the bonus point was a big thing for us."
|Munster Rugby Score Card|
|Jean de Villiers||1||5|
|Glasgow Warriors Score Card|