The Irish Taoiseach Enda Kenny welcomed the decision, saying that people had to "move on and not be blocked by the past".
Sinn Fein politician Mr McGuinness will attend other events organised by the monarch in London during the historic official visit by Irish president Michael D Higgins to the UK.
The former MP, who refused to sit in the House of Commons because of an oath of allegiance to the Queen, had snubbed the gala banquet in her honour at Dublin Castle during a ground-breaking trip to the Irish Republic in 2011.
But in a statement, Sinn Féin leader Gerry Adams confirmed Mr McGuinness would be visiting Windsor Castle and other official events in London during the four-day state visit beginning tomorrow.
"While Martin McGuinness's involvement in President Higgins's state visit may not be welcome by opponents of change, it is yet another example of Sinn Féin's commitment to an inclusive future based on tolerance and equality," he said.
"This decision may cause difficulty for some Irish republicans in light of ongoing difficulties in the north (of Ireland) but I would appeal to them to view this positively in the context of republican and democratic objectives and the interests of unity and peace on this island." Mr Kenny said he "didn't see why (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."