Twitter users posted pictures of the queen's blue hat decorated with flowers with yellow centres alongside an image of the blue flag of the EU, with the yellow stars representing its member states.
"Clearly the EU still inspires some in the UK," tweeted Guy Verhofstadt, the European Parliament's Brexit spokesman, while opposition Labour MP Paul Flynn jokingly referred to it as an "anti-Brexit hat".
Others quipped that the queen might be "trolling" May, pointing out that the 91-year-old British monarch might have been put out by having to attend the delayed formal opening of parliament instead of attending her beloved Royal Ascot horse races.
"Queen trolls Brexiteers," said one Twitter user, while another wrote: "The award for 'Best Trolling Using a Hat' goes to the #QueensSpeech".
"Is the queen trying to tell us something about Brexit with her hat?" the Daily Telegraph asked.
But others expressed confusion, given the rumours that the queen is in fact in favour of leaving the EU.
The BBC has reported that the queen said at a private lunch before the referendum that Britain should "just get on with" leaving the European Union and that Brexit would not be a "problem".
"Given the Queen's compulsory nonpartisan role in the Brexit negotiations, the hat remains riddled with ambiguity," the Guardian newspaper wrote.
"As to whether today will be known as the day she sidestepped impartiality to make a silent protest with her hat, we'll probably never know. But we can have fun with some memes".