It was a bruising encounter with the forwards prominent and captain James Coughlan was awarded man of the match as the Munster pack outmuscled their Connacht counterparts.
As the rain pelted down, it was clear from the outset that the team that managed the conditions would prevail and there were numerous handling errors in the opening minutes as both provinces struggled to get to grips.
Hanrahan gave Munster the lead in the ninth minute when Connacht were caught offside and he split the posts with a long-range penalty.
Connacht bounced back immediately and went ahead on 15 minutes after two quick-fire penalties from Dan Parks on the right with Munster also guilty of offside on both occasions.
Hanrahan scored the first try on 19 minutes after Johne Murphy pounced on a loose clearance kick and committed two defenders before popping off an excellent offload to James Downey who burst through a gap.
Downey was hauled down short of the line and, after the forwards made a few efforts to force their way over the line, Duncan Williams decided to give the backs a chance and he drew a defender before passing to Hanrahan and he sliced through a gap before diving over and adding the extras to make it 10-6.
Just short of the half hour, good defensive work from Paddy Butler won possession back for Munster and a high tackle by Gavin Duffy allowed Hanrahan push the Munster lead to seven and that's how it stayed until the break.
Frank Murphy was shown yellow for Connacht just after the restart for pulling back James Cronin after the prop did brilliantly to disrupt the Connacht ruck and hack the ball through but Murphy impeded him as he chased the kick with Hanrahan once again on target with the penalty to make it 16-6.
Sean Dougall, who played well, had to be helped off after 46 minutes with CJ Stander entering the fray before more indiscipline led to further yellow cards for Munster's James Cronin and Connacht's Nathan White with Munster awarded the penalty in a kickable position, Hanrahan making it 19-6 after 50 minutes.
A Munster infringement at the breakdown on the hour allowed Parks to keep his side in the game with his third penalty to make it 19-9 heading into the final quarter.
The rain began to lash down as the game entered the final ten minutes with the impressive Keith Earls making a great break as his determination and speed took him past three players after a great pass by substitute Gerry Hurley.
CJ Stander thought he had touched down later in the move but it was ruled out for obstruction but Munster were awarded the penalty after an earlier offside with Hanrahan sealing the win, albeit in less exciting circumstances than he has become accustomed, as he slotted the 76th minute penalty.
Connacht showed great heart to touch down late on through substitute Dave Heffernan with Parks converting to gain a late losing bonus point for his side.
Alan Cotter came on for his Munster debut when James Cronin was sent to the sin-bin and Young Munster's Ger Slattery came on late in the game for his first Munster appearance. Gerry Hurley also featured off the bench and played well in his first competitive Munster appearance in six years.
Munster: D Hurley; K Earls, J Murphy (I Dineen 69), J Downey, R O'Mahony; JJ Hanrahan (J Holland 77), D Williams (G Hurley 60); J Cronin, N Scannell (G Slattery 77), J Ryan (S Archer 60); D O'Callaghan, D Foley (B Holland 69); P Butler (A Cotter 49-59), S Dougall (CJ Stander 46), J Coughlan Capt. Replacements: G Slattery, A Cotter, S Archer, B Holland, CJ Stander, G Hurley, J Holland, I Dineen.
Connacht: G Duffy; F Carr, R Henshaw, E Griffin, M Healy; D Parks, F Murphy; B Wilkinson, J Harris-Wright, N White; M Kearney, C Clarke Capt; A Browne, J Muldoon, E McKeon. Replacements: D Heffernan D Buckley, R Ah You, A Muldowney, G Naoupu, K Marmion, J Carty, D Leader
0818 719 300
021 432 3563
061 421 100