The former MP, who refused to sit in the British parliament and who snubbed the ground-breaking royal visit to Ireland in 2011, will be a special guest at a state banquet at Windsor Castle during the first official visit to the UK of an Irish President this week.
Confirming his attendance, which would have been unthinkable a decade ago, Mr McGuinness said the Queen was a “staunch supporter” of the peace process.
“I think she played a leadership role and is playing a leadership role in the whole context of the need for reconciliation,” he said.
Mr McGuinness was given the green light to accept the invitation to the Queen’s official residence and private home during a leadership meeting of his party Sinn Fein.
“All of the information that I have received was that this was something that she wanted to do, that this wasn’t something that she was told to do by the Government,” he said of the invite.
Irish Taoiseach Enda Kenny welcomed the decision, saying that people had to “move on and not be blocked by the past”.
Mr McGuinness, who will also attend other events in the UK during the four-day state visit by Irish President Michael D Higgins, said he was moved by the Queen’s trip to the Irish Republic three years ago.
“I was tremendously impressed by the very solemn way that she commemorated those Irish republicans who lost their lives in the struggle for independence, how she acknowledged the importance of the Irish language and, probably most important of all, when she acknowledged that she had wished that things had been done differently or not at all,” he told RTE radio.
“That was very, very impressive and I think that it is quite clear that this is a woman that is playing a leadership role.”
Mr Kenny, speaking to the BBC’s Andrew Marr, said he “didn’t see why (Mr McGuinness) shouldn’t attend”.
He said: “This is all part of the building of relationships between the two countries and peoples on both side of a divide.
“He’s an elected member of the executive services, Deputy First Minister - we’ve got to move on and not be blocked by the past.”
A Buckingham Palace spokesman said: “There is a long-standing practice of not commenting on individual invitations. That said, Her Majesty is greatly looking forward to this historic state visit and welcoming all guests to Windsor Castle.”
The Queen met and shook hands with Mr McGuinness in Belfast two years ago, in what was seen as another step forward in Anglo-Irish relations and a momentous landmark in the peace process.
Conservative MP Andrew Rosindell, a member of the Foreign Affairs Select Committee, said: “Whilst the man concerned has engaged in things in the past which have created appalling mayhem and tragedy, today we are looking at healing those rifts.
“I would feel very uncomfortable sitting beside him at dinner. I would have great difficulty doing that myself, but in terms of building a democratic foundation in Northern Ireland, I can understand why people feel this is what we need to do.
“But would I want to sit beside him at dinner? No, I certainly would not.”
The highly successful state visit to Ireland by the Queen and the Duke of Edinburgh in May 2011 paved the way for the latest milestone.
In remarkable scenes, the Queen paid her respects to republican dead at Dublin’s Garden of Remembrance, visited Croke Park - site of the 1920 Bloody Sunday massacre - and made a widely-praised speech on Anglo-Irish history at Dublin Castle.
Since then, a number of meetings between Mr Higgins - a former Labour government minister, a poet and academic - and members of the Royal Family have taken place.
Although the Irish head of state has travelled to events in London, Manchester, Liverpool and Scotland last year, these were not official visits.
Likewise, previous meetings between the Queen and then-president Mary McAleese and her predecessor Mary Robinson at various functions in the UK were not official state visits.
Highlights of the visit beginning on Tuesday will include an address the president will make to both Houses of Parliament - another first for an Irish head of state.
The Queen will stage a traditional state banquet in honour of her guest at Windsor Castle, Mr Higgins and his wife Sabina will visit the Royal Shakespeare Company in Stratford-upon-Avon and he will attend another major dinner at the Guildhall in the City given by the Lord Mayor.
Northern Ireland will be recognised with the Queen hosting a reception for leading figures from Ulster’s cultural, political and business life.
Mr Kenny raised the prospect of a royal visit to Ireland at the time of the centenary of the 1916 Easter Rising, when nationalists in Dublin staged a revolt against British rule.
The Taoiseach told the BBC’s Andrew Marr Show: “It should be possible for members of the royal family to visit Dublin during those centenary commemoration ceremonies in 2016. It would be another event in the continuing closeness and closer relationship between both our countries.”
Mr Kenny said: “We’ve got to move on and not be blocked by the past. The Queen herself spoke in Dublin Castle, which was the symbolic head of the British Empire in this country for several hundred years.
“She said if you looked at history, there were some things you might do differently and some things you might not do at all, and her contribution in Dublin three years ago closed a circle of history.”
Mr Kenny denied that he had allowed an atmosphere of greater extremism to develop in Northern Ireland by failing to focus Dublin’s attention on affairs north of the border.
“I disagree with that completely,” he said.
“There are more meetings being held between ministers and officials in various agencies on either side of the border than ever before.
“We contribute very constructively to issues in Northern Ireland in terms of infrastructure, education, health, cross-border activities. These things are at an all-time high level and we want that to continue.”