Munster regained second place in the Pro12 with a narrow derby victory in Galway on Saturday night.
Connacht carved out a 10-6 half-time lead thanks to a converted try from hooker Ethienne Reynecke.
Winger Simon Zebo burst though for a try which levelled the match at 13-13 with just over 20 minutes left.
Miah Nikora, who finished with 11 points, kicked Connacht back in front only for flanker Tommy O'Donnell's 67th-minute try to seal Munster's win.
It lifted Tony McGahan's men back above the Ospreys in the table.
Fly-half Ian Keatley, back at the Sportsground for the first time since his move to Munster, misjudged his first shot at the posts and five minutes later, Nikora landed his first penalty with a steady wind behind him.
Connacht's lead was shortlived, though. From the restart Henry Fa'afili was called for obstruction and Keatley brought Munster level.
The visitors were reduced to 14 men when their captain Mick O'Driscoll saw yellow for pulling a player back off the ball as Connacht pressed for a try.
Connacht wasted little time in making their numerical advantage count, a forceful line-out maul resulting in Reynecke muscling over to the right of the posts.
Nikora added the extras but good work from the Munster forwards allowed Keatley claw back three points while O'Driscoll was off the pitch.
Early in the second half Nikora landed a Connacht penalty and strong carries from Ronan Loughney and Ray Ofisa had them back within sight of the whitewash.
Zebo did well to hold up Duffy over the line after the Connacht skipper had gathered Nikora's pinpoint cross-field kick.
Munster survived a series of five-metre scrums before hitting back on the scoreboard.
Johne Murphy passed long to the left for Denis Hurley who off-loaded out of a tackle for the supporting Murphy and he sent the onrushing Zebo in behind the posts for a well-executed try.
Keatley converted to square things up at 13-all.
The home side dug deep and earned a kickable penalty for Nikora who he duly sent over.
But Munster showed a clinical edge again when the London Irish-bound Tomas
O'Leary attacked off a line-out and passed for O'Donnell to shrug off two tacklers and crash over for the try.
Connacht: Duffy, Tonetti, Griffin, Fa'afili, O'Halloran, Nikora, F. Murphy, Wilkinson, Reynecke, Loughney, Swift, McCarthy, Kearney, Ofisa, Muldoon.
Replacements: Jarvis for Griffin (69), McSharry for Fa'afili (64), Flavin for Reynecke (62), Ah You for Loughney (64), McKeown for Kearney (73).
Not used: Bealham, Grace, O'Donohoe.
Munster: Jones, D. Hurley, Murphy, Mafi, Zebo, Keatley, O'Leary, du Preez, Varley, Botha, Nagle, O'Driscoll, D O'Callaghan, Wallace, Coughlan, O'Dea.
Replacements: O'Dea for D Hurley (68), Horan for du Preez (54), Sherry for Varley (54), B Holland for Nagle (71), O'Donnell for Wallace (41), Deasy for O'Dea (80).
Not used: Archer, Williams.
Ref: Neil Paterson (SRFU).