The US President said other members were "getting their act together" and it had become less likely that other countries would follow the UK's example.
"I think Brexit is very good for the UK, it is going to be very good for UK," he told the Financial Times. "I would have thought when it happened that more would follow, but I really think the European Union is getting their act together. It could be a very good thing for both."
He added: "If you would have asked me that the day after the election... I would have said, 'Yeah, it will start to come apart'. But they have done a very good job and - I am meeting with them very soon - they have done a very good job in bringing it back together."
The US president, has previously boasted that he "predicted Brexit" and enthusiastically supported the decision taken by UK voters in the EU referendum.
Mr Trump, who frequently criticised Angela Merkel during the 2016 presidential campaign, insisted he had a "great" recent meeting with her, despite appearing to decline a handshake with the German chancellor in front of the press.
"I had a great meeting with her," he said. "I really liked her. She said the same thing to me."
He said the centre ground in Europe appeared to be holding: "I think they've done a better job since Brexit. I think they have done a better job."
There is a "different spirit" that was not there "when they were fighting with the UK".
He added: "I actually think it is going to be a great deal for UK, and I think it is going to be really, really good also for the European Union."Reuse content