The Big star recalled being invited to the London landmark with his actress wife Rita Wilson, only to discover that the pair were somewhat overdressed despite the elite guestlist.
"I was with The Queen and the President just last week," he said on The Graham Norton Show. "For an American, I kept trying to figure out, 'Why am I here? How did this happen? Did I win a ticket? Is this Charlie and the Chocolate Factory?'
"We got an email from the White House saying, 'The President and Mrs Obama would like you to join them for dinner at Buckingham Palace'... We got there and it turned out it's a surprisingly informal [event]. Everybody says, 'Hello, I'm Julie!' and 'I'm Simon! Nice to see you! How are you?' It's kind of like on a first-name basis."
Hanks also revealed that he had bonded with the British monarch over their mutual love of the theatre.
"I talked [to the Queen] about doing Shakespeare. That was how I got my start in the United States and we compared notes on that. She said, 'We love to go to the theatre!' That was my moment with Her Majesty."
Hanks is said to have also snagged an invite to a party in California held by Prince William and Kate Middleton, which will take place during the royal couple's trip to the US this summer.