The Prince, a keen music fan, refused to sing on the track but agreed to bash a tambourine which the Take That star recorded to use in the song.
The track, called Sing, was written by Barlow and composer Andrew Lloyd Webber and also features the chart-topping Military Wives. When it is released later this month it is expected to be the first chart single to feature a specially-recorded member of the Royal Family .
Harry added his contribution by hitting the instrument while he was visiting Jamaica – also one of the stopping points when Barlow travelled to various Commonwealth countries to compile the song.
The musician used his laptop as a portable studio to gather recordings from locations such as Australia, Kenya and the Solomon Islands.
The Prince features alongside a number of notable names including celebrated reggae rhythm section Sly & Robbie, plus guitarist Ernest Ranglin, famed for playing on the Dr No soundtrack as well as on timeless 60s hit My Boy Lollipop.
Barlow said he had become fond of Harry after meeting him a few times. “He’s fun and relaxed and he’s a really nice kid.
“We caught him on his last day in Jamaica. We turned up and I asked him would he play on the record and he said ‘I don’t sing’. But I said ‘no, no – I don’t want you to sing, I want you to play the tambourine’. And so he said it’ll cost you.
“Then we met him later on that night and he did the tambourine hit and we spun it into the track. He probably hasn’t got a clue what he’s part of just yet.”
Asked if the prince exhibited any musical talent, Barlow said simply: “No.”
“He’s a great guy Harry – a lot of people I met in Australia, he was their favourite. They loved him, especially the older women. I think he’s one of the Queen’s favourites as well,” he added.
The track is credited to Gary Barlow & The Commonwealth Band, which includes 210 musicians from across the Commonwealth – one of the largest groups of musicians to appear on a UK single.
They include the Royal Solomon Islands Police Force Band, the Sydney Symphony Orchestra, young drummers from Kenya’s Kibera slum and the Australian musician Gurrumul.
The line-up of the Military Wives choir – which was assembled by Gareth Malone – features two new soloists. Elizabeth Simpson from Catterick and Rebecca Ellen Marshall from Wattisham were specially auditioned for the single.
The recording was mixed at the famed Abbey Road Studios in London and Sing will be performed live at the Diamond Jubilee Concert in front of Buckingham Palace on June 4.
The song also features on a commemorative Jubilee album by Barlow which also includes guest vocalists Hayley Westenra, Laura Wright and Alfie Boe.
Sing will be given its first radio play on Chris Evans’s breakfast show on Radio 2 at 8am today and will be released by Decca Records on May 28.
GARY BARLOW AND PRINCE HARRY photo credit metro.co.uk