Just a week after losing his new daughter Poppy, the singer took to the stage to fulfill his commitments and close the Olympics with a special track.
Gary was joined by Howard Donald, Jason Orange and Mark Owen on stage, but ex-member Robbie Williams didn't join the group as had previously been rumoured.
As well as enjoying the brilliant performance, fans and celebs flocked to Twitter to show their respect for Gary.
Britain's Got Talent judge David Williams wrote: "We love you Gary. Gary Barlow. A brave man. And a national treasure."
And Lily Allen added: "I don't know how Gary Barlow does it. #amazing hugest respect for @GBarlowOfficial"
Watch Gary Barlow and Take That at the Olympics closing ceremony below...