There were 63 seconds left on the clock when Ian Keatley restarted the game with his side trailing by four points after a late Tommaso Benvenuti try for the hosts.
Yet, somehow, Rob Penney's side managed to release Hanrahan down the right wing and one sublime step later, the substitute was past Joffrey Michel and diving over in the corner to win the match for his side.
After the game Munster Head Coach Rob Penney, captain Peter O'Mahony, matchwinner JJ Hanrahan and Cathal Sheridan gave their verdict on an incredible finish in Perpignan.
"I'm just so proud of this young group. To come away from a set piece where we got a really poor launch - a couple of wobbly passes, a couple of dropped balls - and we're probably thinking at that point that we're not going to get a crack at maybe getting a five-pointer and then, all of a sudden, we got a bit of structure back and the subs came to the fore down that right-hand channel and it was just beautiful to watch.
"Denis [Hurley] having the confidence to offload to Tommy [O'Donnell], Tommy makes a definite impact in the game and offloads to JJ [Hanrahan] and JJ shows sweet feet to leave his defender grasping at fresh air and the rest is history.
"It's another special Munster moment which is just wonderful for this group.
"We knew how hard it was going to be coming away to France. Any game over here is tough, especially in a cauldron like this.
"We knew it would take something special to get a win and it was a special performance from a team that wasn't playing particularly well.
"But the sign of a good team and a team that is progressing is to get a win like that out in France. It is certainly going to be up there in many books."
"It all happened so fast that I was asking Dinny Hurley 'how did it happen?'
"Luckily [Michel] stood square and then you have got two options like you do every day in training, just pick one and hope for the best.
"It's great to be involved in a team like this. Winning in France is always a tough thing to do.
"It was a team performance and the whole team believed we could win in the last few minutes and luckily we pulled it out of the bag.
"The biggest thing personally from all this for me is just in a way repaying the boys after letting them down in Edinburgh.
"Making that mistake is part of learning, part of growing, but to be able to luckily get on the end of something like that is brilliant."
"Today was huge for me. I could try and act cool and say, 'ah, I will take it in my stride', but it was a massive thing.
"My father travelled over for the game. It was great to have him here, he was running up and down the sideline with a flag. He was going a bit crazy!
"After the try they scored late on, we all tried to gather ourselves. It was bit heart wrenching to see them go over in the corner.
"In fairness, everyone was quite calm, Paulie (Paul O'Connell) and Keats (Ian Keatley) talked about the next play, what we were going to do next.
"As a young fella you grow up watching a game like this. The word 'folklore' is often used about Munster in Europe. I think this is another one to add to the collection.
"All you had to do was see the supporters. The support that travelled over was absolutely incredible. I don't think you can put a price on that."