The president wrote in a tweet: "Get better soon Rudy, we will carry on!"
Mr Giuliani, who has led the Trump campaign's legal challenges to the election results, is the latest person close to the president to be infected.
The president and his team have been criticised for shunning safety guidance. Mr Trump was ill in October.
Mr Giuliani, 76, was admitted to the Medstar Georgetown University Hospital in Washington DC on Sunday, according to US media reports.
In a tweet, the former New York mayor thanked well-wishers for their messages, and said he was "recovering quickly".