The Take That stars joined Barry Manilow on stage on Tuesday night (12 November) for the first of two Children In Need Rocks concerts held at Hammersmith's Eventim Apollo.
The trio, who came suited and booted for the occasion, sang 'Could It Be Magic' in front of a 8,000-strong crowd.
The audience were also treated to a solo performance from Robbie, and Gary even jumped on stage for a special duet with former Abba star Agnetha Faltskog.
X Factor judge Gary, who organised the event, pulled out all the stops for the star-studded bash, which also saw performances from Little Mix, The Wanted and Dizzee Rascal.
X Factor alumni Little Mix added a touch of glamour to the concert and bared their stomachs in crop tops as they performed their hits.
Perrie, who is engaged to One Direction star Zayn Malik, wore loose-fitting patterned trousers as she danced around on stage.
Meanwhile, The Wanted, who have been busy touring in the past few months, came back to London to show their support .
After the show, the boyband tweeted: "Amazing time at #cinrocks thanks @GaryBarlow. Now enroute to Manchester...early start tomorrow for @bbcbreakfast."
The Children In Need Rocks concert, which was hosted by DJ Chris Evans and presenter Fearne Cotton, will continue tonight with performances from Ellie Goulding, Rizzle Kicks and Tom Odell.
Gary kicked off the Children In Need campaign earlier this week, when he held a charity gala in London, which saw performances from the likes of JLS, Nicole Scherzinger and Jason Donovan.
Watch the music video for Gary Barlow's new single 'Let Me Go':