Gentiloni, who served as foreign minister under Renzi, was asked by President Sergio Mattarella to form a new centre-left government that will guide Italy to elections due by February 2018.
A close ally of the outgoing premier, Gentiloni now has to put together his own government team ahead of a parliamentary approval vote expected on Wednesday.
In a brief statement, Gentiloni said there was an "urgent need for a fully functioning government" to address a series of pressing international, economic and social issues.
Mattarella turned to Gentiloni after opposition parties rebuffed overtures about a possible national unity government. The president rejected opposition demands for an immediate election.
More From This Section
"Not by choice but out of a sense of responsibility I will be forming a government based on the outgoing majority," Gentiloni said.
Renzi, who had been in power for two years and 10 months, resigned last week after voters overwhelmingly rejected a package of constitutional reforms on which he had staked his future.
"This government is not even worthy of a vote against it," said Giulia Grillo, head of the Five Star group in the Senate.
Gentiloni, 62, is very close to Renzi and will be seen by the opposition as a puppet premier keeping the seat warm for former boss, who is planning a comeback at the next elections, whenever they are.
In a statement on his Facebook page, Renzi, 41, admitted it had been a wrench to leave office and vowed to pursue his reform agenda.
"Only those who try to change things can help a country as beautiful and difficult as Italy."
Five Star, Italy's biggest opposition party, and the far-right Northern League are demanding a vote as early as possible.
But Mattarella, who enjoys extensive executive powers during government crises, has ruled that the current electoral laws must be revised first.
Theoretically that could happen quickly but the process of harmonising the rules governing elections to the two houses of parliament, the Chamber of Deputies and the Senate, could also drag on for months.