The leading Sinn Féin member, who was formerly an IRA commander in Londonderry, was among dignitaries from the worlds of politics, sport and entertainment who were present for the historic occasion on Tuesday evening.
It was the second time Mr McGuinness has met the monarch after they first shook hands during a Royal visit to Northern Ireland in 2012.
On this occasion their meeting took place away from the cameras as The Queen opened the doors to invite guests into her own home.
However, following speeches by the Queen and the President, Mr McGuinness stood and joined a toast as the orchestra played God Save The Queen.
Before the banquet took place a small protest was held outside Windsor Castle, with relatives of victims of the 1974 Birmingham pub bombings calling for the deputy First Minister to be arrested.
Julie Hambleton, whose 18-year-old sister Maxine died, voiced anger at the British establishment for giving "permission" to Mr McGuinness to "come on to the mainland", adding: "By rights he should be arrested."
The visit of Michael D Higgins, the first official UK state visit by an Irish President, takes place after The Queen came to the Republic of Ireland in 2011.
Addressing guests at the banquet, The Queen said: "My visit to Ireland, and your visit this week, Mr President, show that we are walking together towards a brighter, more settled future.
My family and my government will stand alongside you, Mr President, and your ministers, throughout the anniversaries of the war and of the events that led to the creation of the Irish Free State.
"We will remember our past, but we shall no longer allow our past to ensnare our future. This is the greatest gift we can give to succeeding generations."
The Queen also made reference to the peace process in Northern Ireland.
"Our two governments will continue to work together in Northern Ireland to support the First and Deputy First Minister and the Executive to advance the peace process and to establish a shared society based on mutual respect and equality of opportunity," she said.
She ended her speech by asking guests - including famous faces such as Daniel Day-Lewis, Dame Judi Dench and Irish rugby hero Brian O'Driscoll - to rise and drink a toast to the President and his wife Sabina and "to the health and prosperity of the people of Ireland".
Michael D Higgins then delivered his speech in which he made reference to the Queen's visit to Ireland and praised the steps which have been taken towards peace and reconciliation in NI.
He said: "This present occasion, which completes a circle begun by your historic visit three years ago, marks the welcome transformation in relations between our countries over recent years - a transformation that has been considerably progressed by the advancement of peace in Northern Ireland.
"We owe a great debt to all of those who had the courage to work towards, and make manifest, that peace. We must, however, never forget those who died, were bereaved, or injured, during a tragic conflict.
"We owe a duty to all those who lost their lives, the duty to build together in peace; it is the only restitution, the only enduring justice we can offer them.
"We share, also, the imperative to be unwavering in our support of the people of NI as we journey together towards the shelter and security of true reconciliation.
"We celebrate what has been achieved but we must also constantly renew our commitment to a process that requires vigilance and care," he added.
While we grieve together for lost lives, we will not let any painful aspect of our shared history deflect us from crafting a future that offers hope and opportunity for the British and Irish people.
Michael D Higgins
One hundred and sixty guests attended the banquet in the splendour of Saint George's Hall.
First Minister Peter Robinson was accompanied by his wife Iris. The leaders of the UK's three main political parties, as well as Taoiseach Enda Kenny and Tánaiste Eamon Gilmore, were all there, along with Northern Ireland Secretary Theresa Villiers.
Mr McGuinness sat between Sir Paul Nurse, the Nobel Laureate scientist and Shami Chakrabarti, the civil liberties activist.
The Queen sat to the left of President Higgins with the Duchess of Cornwall on his right hand side, while the Prince of Wales sat next to Ms Higgins' and the Duke of Edinburgh sat on her other side.
All of the guests shook hands with Her Majesty, including Mr McGuinness.
The event brought to an end the first day of the Irish President's visit to the UK, after he earlier addressed the Houses of Parliament and laid a wreath at the Grave of the Unknown Warrior.
UTV's Political Correspondent Tracey Magee, who is in London, said it has been a significant day of developments in terms of Anglo-Irish relations.
She said: "I was struck by how The Queen and President Higgins' speeches reflected one another - and both talked about the long and troubled past the two countries have had and how in recent years there has been a tremendous change in relations.
"We didn't see the handshake tonight with Martin McGuinness but we do know that all the guests were presented to The Queen and earlier today he said he was going to observe the protocol.
"There are a number of events taking place this week so we may not have seen it tonight but we probably will see it some time this week."