In a newspaper interview at the time he was critical of Mrs May’s handling of Brexit.
Protests against the visit led to a policing bill of $14.2 million.
Mrs May’s official spokesman said she “looks forward to welcoming all Nato leaders” in December.
Mr Trump’s attendance at the summit would be separate from a proposed state visit, for which no date has been fixed.
Jens Stoltenberg, the Nato secretary general, said: “We are grateful to the United Kingdom for agreeing to host this meeting in Nato’s 70th anniversary year.
“Brexit will change the United Kingdom’s relationship to the European Union, but it will not change the United Kingdom’s relationship to Nato. For me it’s perfectly natural that the UK is hosting the leaders’ meeting.”