Obama, making his last foreign trip as president, said the NATO alliance was "absolutely vital" to US interests and stressed a strong, unified Europe was good for America, after Trump, on the campaign trail, appeared to play down the importance of transatlantic ties.
After a year of populist shocks, from Britain's vote to leave the EU to Trump's surprise victory last week and the rise of anti-migrant movements in Europe, Obama cautioned against succumbing to divisive instincts.
"We know what happens when Europeans start dividing themselves up... The 20th century was a bloodbath," he said, adding that the United States was also painfully aware of the dangers of "(dividing) ourselves along lines of race or religion or ethnicity."
Europeans, especially those in eastern countries close to Russia's orbit, have been shaken after Trump appeared to call into question Washington's near 70-year security guarantee by saying he would only help NATO allies if they paid their way.
More From This Section
"Across Democratic and Republican administrations there is a recognition that the NATO alliance is absolutely vital," he said.
As Obama touched down in Athens, NATO head Jens Stoltenberg said he was confident Trump would live up to US commitments to the alliance.
"I am certain that he will be a president... Who will live up to all the commitments of the United States in the alliance, because a strong NATO is important for Europe but it's also important for the United States," Stoltenberg said.
More than 800,000 migrants passed through Greece last year, and the crisis-hit country has struggled to accommodate some 60,000 left stranded on its territory when Balkan states further north closed their borders earlier this year.
Greek leaders are anxious for a new US pledge to help alleviate the country's enormous public debt, a measure actively sought by the International Monetary Fund but opposed by leading European lender Germany.