Hamas has run Gaza since 2007, having seized it in a near civil war from Fatah following a dispute over parliamentary elections won by the Islamist movement.
Palestinian Authority leader Mahmoud Abbas is preparing for his meetings and speeches in NY but meanwhile, Hamas is presenting him with another reconciliation challenge supported by Cairo.
In a statement, Hamas said it had dissolved its shadow government and will allow the reconciliation government to operate in Gaza and it agrees to hold elections and enter talks with Fatah. A unity government formed after Hamas won the last Palestinian general election, in 2006, was short-lived.
Hamas has demonstrated a willingness to reach agreement with the Palestinian Fatah movement under the mediation of Egypt.
It also was not immediate clear how Egypt's latest effort aligns with its previous tacit support for a separate Gaza power-sharing deal between Hamas and Mohammed Dahlan, an exiled former Abbas aide-turned-rival.
The group said it was "responding to the generous Egyptian efforts, which reflect the Egyptian desire to end the split and achieve reconciliation, and based on our desire to achieve national unity".
Hamas says it accepts Abbas's reconciliation demands
Gaza's economy is in tatters and residents of the territory have electricity for only a few hours a day. Hamas is under growing financial pressure as Egypt has destroyed numerous smuggling tunnels Hamas used previously, and Abbas has turned up the screws on the rival Hamas by refusing to pay for electricity in Gaza, and cutting salaries for civil servants.
Hamas - who remain on the United Nations terror list - has been greatly weakened by an Isaeli and Egyptian blockade, three wars and global isolation. The two sides were still in the Egyptian capital of Cairo on Sunday night.
Representatives for Abbas, who is in NY ahead of the U.N. General Assembly this week, could not be reached for comment, nor could Fatah representatives presently in Egypt, which has been hosting talks with Hamas.
Despite Sunday's announcement, any reconciliation deal would still face many obstacles.
Following the meeting, Haniyeh said that Hamas was ready "to hold a dialogue with Fatah in Cairo immediately, to come to an agreement and set the terms for its implementation".
Israel has blockaded Gaza for a decade, and its border with Egypt has also remained largely closed in recent years.More news: Cassini mission to Saturn