But a series of spats have driven the two leaders apart, culminating in the president's extraordinary public criticism of May's Brexit strategy.
But a series of spats have driven the two leaders apart, culminating in the president's extraordinary public criticism of May's Brexit strategy as he arrived on a visit to Britain this week.
Here is a chronology of their deteriorating relationship:
November 2016: The US president-elect catches May off-guard when he tweets that former UK Independence Party leader and Brexit champion Nigel Farage "would do a great job" as Britain's ambassador to the United States.
May's Downing Street office is forced to say there is "no vacancy".
January 2017: May meets Trump at the White House, where he predicts that "great days lie ahead for our two peoples and our two countries", raising hopes of a swift post-Brexit trade deal.
The defining image of the trip is of Trump holding May's hand as they walk outside the White House. It attracts derision in Britain. The British leader invites her counterpart for a state visit.
But the feelgood factor lasts only a matter of hours, as the US leader unexpectedly announces a travel ban targeting seven Muslim-majority countries, affecting dual British citizens.
May says she "did not agree" with the ban, and British lawmakers demand she rescind the state visit invitation.
June 2017: Trump takes aim at London Mayor Sadiq Khan following a terror attack in the British capital.
Distorting a message from Khan telling Londoners there was "no reason to be alarmed" by an increased police presence, Trump tweets: "At least 7 dead and 48 wounded in terror attack and Mayor of London says there is 'no reason to be alarmed!'"
Khan responds, saying: "We're not schoolchildren. He's the president of the United States, so I'm unclear what his beef is with me."
September 2017: After the botched bombing of a London underground train, Trump weighs in again, tweeting: "Another attack in London by a loser terrorist. These are sick and demented people who were in the sights of Scotland Yard. Must be proactive!"
May responds it was "unhelpful" to speculate on an ongoing investigation.
November 2017: Trump retweets three videos originally posted by Jayda Fransen, deputy head of far-right group Britain First, purportedly showing Muslims engaging in acts of violence, although one of the videos is later debunked.
May says Trump was "wrong" to retweet the messages, but the US leader hits back, tweeting to May: "Don't focus on me, focus on the destructive Radical Islamic Terrorism that is taking place within the United Kingdom."
January 2018: Trump says he is not coming to inaugurate the new US embassy building with a tweet, calling its new site in south London an "off location".
"I am not a big fan of the Obama Administration having sold perhaps the best located and finest embassy in London for 'peanuts'," he wrote, adding: "Bad deal. Wanted me to cut ribbon-NO!".
May 2018: Trump tells a National Rifle Association convention that a "once very prestigious hospital" in London was like a "war zone" because of knife crime.
"Yes, that's right, they don't have guns, they have knives and instead there's blood all over the floors of this hospital. They say it's as bad as a military war zone hospital."
He then mimicked someone using a knife.
Knife-related crimes rose by 23 percent in London last year.
July 2018: With the promised state visit now downgraded to a working trip, the president drops a bombshell for May as he begins the four-day stop fresh from rebuking NATO allies in Brussels.
Interviewed by The Sun newspaper, Trump says May is deviating from British voters' wishes with her plan to retain close trading links to the EU after Brexit.
"I would have done it much differently. I actually told Theresa May how to do it but she didn't agree, she didn't listen to me," he says.
May's plan would "probably kill" her hopes for a post-Brexit trade deal with the United States, Trump says, and for good measure adds that former foreign minister Boris Johnson, who resigned over the Brexit plan, would make "a great prime minister".
The undiplomatic language does nothing to endear Trump to the many protesters who intend to shadow the president's visit, complete with a nappy-clad blimp bearing his features.