Munster crucially struck for 10 unanswered points late in the first half while Connacht hooker Jason Harris-Wright was in the sin-bin.
Ian Keatley converted a penalty try and added his second penalty, handing Rob Penney's men a 13-6 interval lead with Dan Parks booting a brace of penalties for Connacht.
A third penalty and a drop goal from Parks set up a grandstand finish during which George Naoupu was inches away from grabbing the match-winning try.
The big Connacht lock slid onto a grubber kick in the right corner but failed to get the necessary downward pressure according to television match official Marshall Kilgore.
It was a heartbreaking result for the westerners, who had lost by the exact same four point margin on both of Munster's last two visits to Galway.
Connacht brought the wind and rain home with them from Biarritz last week, and were boosted by the return of stand-in captain Nathan White and Naoupu to their pack.
Munster made 10 changes to the side that went down to Saracens last Sunday, with centres Casey Laulala and James Downey among the five survivors.
The visitors got off to a robust start, carrying strongly in midfield with recent Ireland cap David Kilcoyne very much involved.
Connacht threatened with a deft dink from Parks that David McSharry gobbled up, but the young centre lost the ball in contact.
Parks opened the scoring in the 11th minute, his wobbly penalty from the left going through the posts after Donncha O'Callaghan was penalised for a ruck offence.
It brought about a strong response from the men in red, hooker Mike Sherry going close at the end of a lineout maul and the attack led to Keatley's levelling penalty.
A cleaner strike from Parks edged Connacht back in front, punishing Tommy O'Donnell for not rolling away.
The former Scotland international was growing in influence, but his opposite number Keatley pulled off a terrific try-saving tackle on Fetu'u Vainikolo as the Tongan winger raced towards the left corner.
The momentum shifted to Munster just before the break as repeated ruck infringements saw Connacht lose Harris-Wright to the sin-bin.
Continuing the recent spate of quickly awarded penalty tries, the resulting close-in scrum saw the seven man Connacht pack lose ground and referee Dudley Phillips signalled for a penalty try.
Keatley converted the 37th minute effort and rewarded a second ground-gaining scrum from Munster near halfway by landing a crisply struck late penalty.
The run of penalties against was beginning to hurt the westerners, with Keatley nudging over his fourth successful kick on the resumption.
Eoin McKeon won a lineout to set up the Connacht forwards for a series of pick and goes and Parks popped over a close-range penalty for a 16-9 scoreline.
A drop goal from 25 metre range from Parks put just four points between the sides, the opportunity coming after young number 8 McKeon ran hard from turnover ball.
With Mike McCarthy and replacement Michael Swift having more of an impact, Connacht's tails were suddenly up and Munster centre Downey soon saw yellow for a high tackle on McCarthy.
Parks missed the resulting penalty though and the covering Peter Stringer did just enough to put Naoupu off as the pair dived for that bouncing ball nine minutes from time.
Munster held their ground and their late control of possession wound down the clock for another hard-fought inter-provincial victory.
Elsewhere in the division Treviso held on for a 10-3 victory in a low-scoring clash at Zebre.
Alberto Di Bernardo struggled with the boot for the visitors, but a try from Chritsian Loamanu proved the difference between the two sides.