Gagli and Molinari, who have been sharing a hotel room in Oman, were subject to concerns that they had coronavirus after Gagli showed flu-like symptoms and was assessed by the tournament's on-site medical team.
The European Tour said in a statement: "In consultation with the Omani Ministry of Health, and in-line with current World Health Organisation guidelines, Gagli was tested for Coronavirus (Covid-19) and immediately entered self-isolation as a precaution.
"Gagli had been sharing a hotel room with Edoardo Molinari, who showed no signs of illness, but as a further precaution he also entered self-isolation in a separate room."
The Omani Ministry of Health reported that Gagli's test results were negative -- both players have since been reinstated and will tee-off for the first round of the tournament on Thursday afternoon.
"This is a difficult global situation, one during which we will continue to follow all guidance given to us on preventive measures," European Tour chief executive Keith Pelley said. "All decisions will continue to be made in the interests of overall public health."
According to Italian newspaper La Nazione, European Tour doctor had told Gagli at breakfast on Wednesday to return to his room. Molinari was moved to another room.
"I feel fine," Gagli told La Nazione on Wednesday. "I just have a cold."
Gagli said the European Tour sent an email last week requesting a vaccine for yellow fever for those planning to play in the Hero Indian Open on March 19-22 in New Delhi. He said he could not get the vaccine before leaving Italy and was checked out by a European Tour doctor on Tuesday.
Gagli also said that he and Molinari had suffered "serious economic damage," as well as calling the original decision to withdraw "despicable," before the pair were reinstated a day later.
"I told her [a tour official] that I had had a fever until last Friday and she told me to wait two more days before getting the vaccine," Gagli added. "I went to train like normal and then this morning I was told of the decision to put me in isolation.
"It's an inexplicable decision. Only us two have been excluded from the tournament, but I arrived in Muscat last Sunday and over the last few days I've worked out in the gym with dozens of other players. I ate with them and traveled by bus with them.
"If there was a risk of contagion, then they would have to isolate dozens of golfers and cancel the tournament."
Gagli, a 34-year-old from Florence, is world No. 407 and his only victory is the Kenya Open in 2018 when it was part of the Challenge Tour. Last year, he was part of a four-man playoff in the European Masters in Switzerland that included Rory McIlroy and was won by Sebastian Soderberg.
Molinari is a former U.S. Amateur champion who played in the 2010 Ryder Cup along with his brother, former British Open champion Francesco Molinari.
Italy has reported 447 cases of the coronavirus, the most of any country outside Asia. Twelve people infected with the virus have died in Italy since Friday, all of them elderly, having other health conditions or both, civil protection chief Angelo Borelli said.
The Italian government has defended its handling of the public health emergency while acknowledging the inability to pinpoint the origins of the two clusters in the northern Lombardy and Veneto regions.
Information from Associated Press contributed to this report.