A statement on Syrian state television said Foreign Minister Walid al-Moallem and U.N. disarmament chief Angela Kane struck the deal during talks in Damascus, and that the two sides are working to finalize the date and time of the visit.
The world body said that a team of U.N. experts already in Syria has been instructed to focus on investigating the purported attack on Wednesday. The mission "is preparing to conduct on-site fact-finding activities'" on Monday, U.N. spokesman Martin Nesirky said in a statement.
Anti-government activists and Doctors Without Borders say that more than 300 people were killed in the alleged toxic gas attack on the eastern suburbs of the Syrian capital. Images purporting to show the aftermath of the attack are filled with people gasping for breath and dead children unmarked by any wounds.
The eastern Ghouta area where the attack took place is under opposition-control, which makes arranging a trip across the front lines difficult. Rebels and the main Western-back opposition group have said they would guarantee access and the safety of a U.N. team to facilitate an investigation.
Nesirky said the Syrian government "affirmed that it will provide the necessary cooperation, including the observance of the cessation of hostilities at the locations related to the incident."
He added that U.N. chief Ban Ki-moon "would like to reiterate that all relevant parties equally share the responsibility of cooperating in urgently generating a safe environment for the mission to do its job efficiently and providing all necessary information."
The deal appears to meet the demands of the world powers, including the U.S., Britain, France and Russia, all of whom called on the Syrian government to cooperate with the U.N. and grant inspectors access to the sites.
Confirming whether chemical weapons were indeed used carries enormous stakes, and could play a large role in determining the future course of Syria's civil war. It has reinvigorated debate about the possible use of foreign military action in the conflict.
Last week, France said that if an independent investigation confirms that chemical weapons were indeed employed, then military force could be used in Syria.
The U.S. Navy has sent a fourth warship armed with ballistic missiles into the eastern Mediterranean Sea, closer to Syria, as President Barack Obama considers a military response.
A senior administration official said Sunday that the U.S. has "very little doubt" that chemical weapons were used in Wednesday's attack. The official said the U.S. intelligence community based its assessment, which was given to the White House, on "the reported number of victims, reported symptoms of those who were killed or injured" and witness accounts.
That appeared to align with French assessments as well.
The U.S. official spoke on condition of anonymity because he was not authorized to discuss the matter.
In Paris, French President Francois Hollande said a "body of evidence" suggests that chemical weapons were used during Wednesday's attacks, and that Syrian President Bashar Assad's regime was most likely behind it. According to a statement Sunday from his office, Hollande said "everything" leads France to believe the regime was behind the attack. It didn't elaborate.
The U.N. team that will carry out the investigation arrived in Syria last week to look into three earlier purported chemical attacks. The mission is led by Swedish expert Ake Sellstrom.
Meanwhile, Syrian state TV said a car bomb killed the governor of the central province of Hama on Sunday. Anas Abdul Razaak Naem was assassinated in the Jarajima neighborhood of the city of Hama, the provincial capital, it said. No further details were immediately available.
Assassinations of politicians, army officers and journalists who support President Bashar Assad's regime are commonplace in Syria's civil war. At least 100,000 people have been killed in Syria since the country's crisis began in March 2011.