The concert was broadcast live on BBC One and BBC Radio 2 in the UK and to millions around the world.
It was a joint venture between the BBC and Gary Barlow, who co-wrote Sing, the official song for the Diamond Jubilee celebrations.
Williams was the first star of the night, taking to the specially constructed stage around the Queen Victoria Memorial to sing his hit Let Me Entertain You.
He was followed on stage by Black Eyed Peas member Will.i.am, his fellow The Voice judge Jessie J and chart-topping boy band JLS.
Barlow then took to the stage himself to perform a surprise duet with Cheryl Cole.
Next on the bill was Sir Cliff Richard, who performed a decade-straddling medley of hits and his 1968 Eurovision track Congratulations.
Singer Grace Jones surely deserved some herself for performing Slave to the Rhythm while spinning a hula hoop around her midriff.
The world of classical music was represented by Chinese pianist Lang Lang, US soprano Renee Fleming and English tenor Alfie Boe.
Other artists who appeared include Annie Lennox, Ed Sheeran and Sir Tom Jones.
Dame Shirley Bassey performed Diamonds are Forever, while Kylie Minogue – dressed as a pearly queen – was joined by street dance crew Flawless.
She was followed by Sir Elton John, who sang such tracks as Crocodile Rock and Our Song in a sparkly pink jacket.
Stevie Wonder took the opportunity to wish the Queen a happy birthday during a set that included Isn’t She Lovely.
Though the monarch was born on 21 April, her official birthday is traditionally celebrated at the beginning of June.
Pop veterans Madness then performed Our House from the roof of the Palace.
It was there that the Queen guitarist Brian May played the National Anthem during the Golden Jubilee concert in 2002.
Between the music acts, hosting duties were handled by Rob Brydon, Miranda Hart, Lenny Henry and Lee Mack.
“As a nation, this is our opportunity to thank you and my father for always being there for us,” he said.
The Duke of Edinburgh was unable to attend the concert after being taken to hospital earlier with a bladder infection.
“Unfortunately he is taken unwell,” the Prince told the crowd. “But if we shout loud enough, he might just hear us in hospital.”
[BBC News web 4 June 2012 Last updated at 22:09 GMT]