Trump was speaking ahead of the start of a state visit to Britain on Monday, during which he will meet May.
Asked by the British tabloid newspaper The Sun for his opinion on the 12 candidates to replace her, Trump said, “I think Boris would do a very good job. I think he would be excellent.
“I have always liked him. I don’t know that he is going to be chosen, but I think he is a very good guy, a very talented person.”
He added that several candidates in the Conservative leadership race had asked for his support, without revealing who.
A key Leave campaigner in the Brexit referendum, Johnson has said he is prepared to take Britain out of the European Union, “deal or no deal”.
In the interview, Trump also repeated his criticism of how May has handled Brexit negotiations, saying Britain had allowed the EU to “have all the cards”.
“It is very hard to play well when one side has all the advantage,” he said. “I had mentioned to Theresa that you have got to build up your ammunition.”
May concluded a divorce agreement with the EU in November but her deal was rejected three times by the British parliament, forcing her to seek a delay in leaving the bloc, now scheduled for October 31.