The Portuguese rider lay fourth overall after dropping 1:10 to maglia rosa Richard Carapaz (Ineos Grenadiers) on the mountainous stage to Lavarone, but will take no further part in the race following his positive test.
Following early reports from Tuttobiciweb, team manager of UAE Team Emirates, Andrea Agostini, confirmed to Cyclingnews at the stage 18 start that Almeida had tested positive for the virus and would be leaving the race.
Almeida is the only rider on the team to test positive, with the team confirming that riders had been staying in single rooms during the Giro d'Italia.
His symptoms are mild, with the team confirming that he was suffering from a sore throat through the night before testing positive on Thursday morning.
"Almeida woke up last night from persistent pain in his throat and the test gave a positive result," said UAE Team Emirates team doctor Michele De Grandi.
"We observe strict rules of prevention and, in addition to sanitising the environments which the team uses each day (cars, buses, hotel rooms, etc.), we keep the athletes themselves in single rooms in order to limit very close contacts. However, despite these precautions they clearly do not provide 100% shelter as we have seen."
Team principal Mauro Gianetti said that UAE Team Emirates would have to accept the reality of the situation, adding that the most important thing going forward is Almeida's recovery.
"We are obviously deeply upset because João and the supporting team were doing an excellent race," he said. "Our goals were the podium of the Giro and the white jersey as best young rider and we were fighting to win them both. It is bad news, but this is the reality we have been living every day for two years. We have to accept it and look forward. Now the most important thing is that João recovers as soon as possible."
Almeida slipped out of third place on Wednesday's stage after dropping from the GC favourites group on the final climb to Monterovere. He finished the day in 14th place, 3:23 down on stage winner Santiago Buitrago (Bahrain Victorious). Mikel Landa gained 1:04 on Almeida at the line to move up into third.
"Of course it's tough but I don't want to give up. I'll keep fighting and the Giro is not over for me yet," Almeida told Eurosport after the stage.
"Since the beginning of the day I didn't feel well. I wasn't 100% recovered from yesterday. It was a really tough rider and I knew right away that my legs weren't at the normal level today."
Former race leader Juan Pedro López (Trek-Segafredo) will take over the white jersey as best young rider. The Spaniard lies eighth overall at 12:27 behind Carapaz.
'We thought it was just a bad day'
Speaking ahead of stage 18, a day for the sprinters in Veneto, UAE Team Emirates directeur sportif Fabio Baldato told Cyclingnews and other reporters at the Giro d'Italia that the team had initially assumed Almeida's time loss on Wednesday's mountain stage was just a bad day on the bike.
He acknowledged, however, that Almeida's condition on the stage had likely been affected by the COVID-19 virus, despite him managing to limit his losses on the final climb but then shedding more time on the rolling final 8km run to the line.
"We thought it was just a bad day," Baldato said. "He told us at the beginning of the climb he was not great and [asked] 'Please guys, support me as much as you can.' In the car we screamed all the way up the climb with him."
"He was great up to the end, suffering and losing more time on the flat part than on the climb. In the end it's easy to say yes for sure that's the reason. It wouldn't be the first time in the past two years that COVID-19 has affected a rider's performance."
Baldato said that Almeida had been feeling upbeat as he headed into the race's final four stages, which include two further summit finishes and the last day 17.4km time trial in Verona.
"He was really confident, for the most part in his endurance capacity," he said. "Not to be the best or the strongest but not losing too much. That is his power. He was confident that sooner or later maybe someone else could crack or have a bad day. His power is to be close and then go for the TT on the last day."
Baldato concluded that, despite the disappointment of losing Almeida and the white jersey and a possible podium place in Verona with him, the race had been a confirmation of his team leader's abilities in what was his first Grand Tour outing for UAE Team Emirates.
"For sure, he deserved the support we gave to him. All the other riders sacrificed – riders like [Diego] Ulissi, [Alessandro] Covi, [Davide] Formolo all had ambitions to win a stage but it was necessary to wait and stay with him.
"All the group all the staff put a lot of work in the last two months to come here to the Giro. Of course, we go out with a good feeling that João is a GC guy and a GC leader for the future."
Thank you for reading 5 articles in the past 30 days*
Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read any 5 articles for free in each 30-day period, this automatically resets
After your trial you will be billed £4.99 $7.99 €5.99 per month, cancel anytime. Or sign up for one year for just £49 $79 €59
Join now for unlimited access
Try your first month for just £1 / $1 / €1