Nine-times world champion Rossi must show two consecutive negative tests to be allowed to race in the first of two successive grands prix at the Spanish track.
His test on Tuesday again came back positive but the 41-year-old was taking another on Wednesday. Should that be negative, he will have time for a second test before flying to Valencia from Italy.
Rossi is the first MotoGP rider to test positive for the coronavirus.
MotoGP star Jason Dupasquier dies after crash
"Luckily I still have two more chances to be back on track on Friday or Saturday," said the Italian. "I am very sad because I am feeling well, and I can‘t wait to be back aboard my M1 and be reunited with my team.
"I really hope the next PCR test result will be negative, because missing two races was already two too many."
Rossi, no longer in title contention, missed the races at Spain's MotorLand Aragon after contracting the virus, with Maverick Vinales the sole works Yamaha rider.
World Superbike rookie Gerloff has never ridden the YZR-M1 bike before or visited the Valencia circuit. The team's official test rider is three times MotoGP champion Jorge Lorenzo.
"This year has already been quite the adventure, and this would be the cherry on top," said Gerloff.
"It's been a dream of mine to ride the Yamaha YZR-M1 MotoGP bike since I started racing so many years ago... but I am just sorry to get this opportunity under these unfortunate circumstances for Valentino.
"If I do end up riding this weekend, it will be an uphill battle not knowing the bike, tyres, brakes, etc." (Reporting by Alan Baldwin in London, editing by Christian Radnedge)
Quartararo sets lap record to take pole at Italian GP
IWD special – 'Any sport should be equal' – FHO Racing boss on proving women belong in motorsport