Ranieri resigns as Roma coach
"I have always thought about the good of Roma," he was quoted as saying by ANSA news service.
"After a game like that today, I think it is right to give a signal. At the final whistle I went into the dressing room to thank the team and I have decided to resign."
Cash-strapped Roma, who are in the process of being sold, lost 3-2 at home to Ukrainians Shakhtar Donetsk in the Champions league last-16 first leg on Wednesday.
Around 200 fans protested at Roma's training ground on Saturday, throwing flares and firecrackers at the gates before being dispersed by police.
Roma produced a stunning run to finish second in Serie A last term in Ranieri's first season in charge after taking over from Luciano Spalletti. They now lie eighth and have not won in five games in all competitions.
Rome-born Ranieri has also had a difficult relationship with club captain Francesco Totti, who has played for Roma his whole career and is regarded by fans as the heartbeat of the club.
American consortium Di Benedetto is in talks to buy the club and reports had said they might look to replace the former Atletico Madrid, Chelsea, Valencia and Juventus coach in any case, with current Chelsea manager and Roma fan Carlo Ancelotti touted.
Retired former Roma striker Vincenzo Montella could take over in a caretaker role but it is unclear who would make the decision given the club's circumstances.
Rosella Sensi remains the president until the club is bought but creditor bank UniCredit has been in de facto control for months as it looks to recoup debts from a sale which has dragged on and stopped Ranieri buying players in January.
However, the club hierarchy were already pondering Ranieri's position before he resigned.
"We want to think about things calmy. We will make a decision with our head," director Gian Paolo Montali told reporters straight after the Genoa game.