Contepomi's three points took the spoils just when it appeared as though Ireland were going to nick a narrow victory on an occasion when emotions were running high for a number of reasons.
Bathed in sunshine, the evening got off to a poignant start as a minute's silence was impeccably observed to mark the recent passing of Gloucester's Rugby Operations Manager John Brain.
The action that followed would probably have met with John's approval. The Barbarians, as is their tradition, turned down kicks at goal but, apart from that, played with the intensity of a full international.
Both sides played with some physicality and players squared up to each other on several occasions in the first half alone.
If Ireland were looking for a hard fought encounter ahead of their tour to New Zealand, then they certainly got one!
The Barbarians included Rory Lawson and Mike Tindall who both received a raptourous reception from the home crowd while former favourite Iain Balshaw was also warmly greeted.
And it was Balshaw who ghosted home for the game's opening score as he finished off a period of sustained pressure following breaks from Tindall and the impressive Makuma Gorgodze.
Ireland responded quickly through right wing Craig Gilroy. The Ulster winger was a threat throughout the game and wriggled, spun and fought his way to the line when he looked set to be bundled into touch to get his team on the board.
Another Tindall break led to a close range try for lock Cornelius Van Zyl before Keith Earls crossed after a length of the field move from Ireland.
However, the Barbarians finished the half the stronger. Sackey caught the defence napping with a quick tap and scored without a finger laid on him while Balshaw was held up over the line to deny him a second try.
The intensity didn't subside after the interval although Ireland were quicker out of the blocks as they fashioned a try for left wing Simon Zebo to retake the lead.
Roared on by a Kingsholm crowd who were clearly enjoying the occasion, the Barbarians refused to cave in and, when Tindall smashed his way over on 57 minutes for a hugely popular try, the roof was almost lifted off the stadium.
Realising that defeat was on the cards, Ireland fought back again. Gilroy was involved once more. His break made the initial inroads and he was then on hand to finish in the right hand corner.
Ronan O'Gara had kicked superbly off the tee all evening and he added a fine conversion from the touchline to nudge Ireland back in front 28-26.
If anything, the atmosphere became more highly charged as the minutes counted down.
Balshaw and Lawson both left the field to massive applause particularly the Scotland scrum half who took his time departing, turning to all four corners of the ground as he waved farewell to the Kingsholm faithful.
And perhaps the home support inspired the Barbarians to one last effort as they've done so often in the past for Gloucester.
The Baa-Baas pack worked their way into the Irish 22 and a hand crept into the ruck and killed the ball.
There was no hesitation in terms of what to do with the penalty. As Barbarians Head Coach John Kirwan said afterwards, "You never apologise for winning."
Up stepped Contepomi and his penalty sealed a fine win on a memorable evening, one that will duly enter Kingsholm folklore.