Tiernan O'Halloran's opportunist try helped Connacht move 10-0 ahead but the deficit was halved by the break thanks to a maul try from Niall Scannell.
Connacht centre Craig Ronaldson fired over a penalty before a converted penalty try saw the hosts close to within a point.
Bundee Aki's late try sealed a win to take Connacht four clear at the top.
The opening points came with Ronaldson's penalty punishing a high tackle from Donnacha Ryan.
Munster missed 11 tackles in the opening 14 minutes and 22 by the interval - one of those defensive lapses saw hooker Scannell allow O'Halloran clean through for his try, which Ronaldson converted.
Munster were quick to respond and after successive line-outs Scannell plunged over from a well-controlled drive, although Ian Keatley was wide with the conversion attempt.
Ronaldson's penalty on the hour mark, set up by some excellent ruck work from captain John Muldoon, kept Connacht on course.
However, breaks from Keith Earls and Keatley got Munster into try-scoring range and Muldoon's impeding of Andrew Conway in the 22 resulted in a yellow card and penalty try, which Keatley converted.
With their lead cut to 13-12, Connacht missed an opportunity to steady their nerves when Ronaldson sent a kickable penalty wide from the right.
But rather than defend the one-point margin, they attacked with great ambition and got their reward three minutes from time when Robbie Henshaw's neat break on the Munster 22-metre line and flat offload sent Aki diving over past Conway.
Munster: Conway, van den Heever, Earls, Saili, Gonzalez Amorosino, Keatley, O'Leary, Cronin, N. Scannell, Botha, D. Ryan, Chisholm, Stander, O'Donoghue, Copeland.
Replacements: Hurley for van den Heever (50), Williams for O'Leary (65), Kilcoyne for Cronin (61), J. Ryan for Botha (41), Foley for D. Ryan (56). Not Used: O'Byrne, Coghlan, R. Scannell.
Connacht: Henshaw, O'Halloran, Aki, Ronaldson, Healy, A. MacGinty, Marmion, Buckley, Delahunt, White, Dillane, Muldowney, Muldoon, Connolly, Masteron.
Replacements: Leader for O'Halloran (68), Carty for A. MacGinty (45), Loughney for Buckley (54), Heffernan for Delahunt (61), Bealham for White (58), Naoupu for Dillane (63). Not Used: O'Brien, Porter.
Sin Bin: Muldoon (65)
Att: 12,000
Ref: Ben Whitehouse (Wales)
Pro12 leaders Connacht clinched a first competitive win at Thomond Park since 1986 with victory in the top-two clash.