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 are going to have to guard against a rise in a crude sort of nationalism or ethnic identity or tribalism that is built around an 'us' and a 'them'," Obama said in Athens.
"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."
RELATED READING
Obama tries to calm US allies who are worried about Trump
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.
Obama stressed that the transatlantic relationship was the "cornerstone of our mutual security as well as prosperity" and that was the case regardless of who was sitting in the Oval Office.
"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.
RELATED READING
Trump will get wake-up call, Obama says
Alternative to austerity
Obama met Prime Minister Alexis Tsipras for talks and praised Greece for showing "extraordinary compassion" to hundreds of thousands of people arriving in Europe's migrant crisis.
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.
Obama, who travels to Germany on Wednesday for talks with Chancellor Angela Merkel and French and British leaders, said he would push for help for Greece.
"In my message to the rest of Europe I will continue to emphasise our view that austerity alone cannot deliver prosperity," Obama told Tsipras.
Even with structural reforms, he argued, "it is very difficult to imagine the kind of growth strategy that is needed, without some debt relief mechanism...(although) the politics of (doing) this are difficult."
Mixed welcome for Obama
Security was tight in central Athens, with thousands of police officers on the streets and an official ban on demonstrations in areas of the capital where Obama will hold his meetings.
Many Greeks are suspicious of the United States after it helped install a repressive dictatorship in the country in the 1960s.
Greek trade unions, leftist and anarchist parties have called for protests to denounce "imperialist" US involvement in wars in the Middle East.
"Butcher Obama is not wanted," the Communist-affiliated PAME union said, while the left-leaning Efimerida ton Syntakton charged that Obama's drone attacks have killed 4,700 people.
The increased security also comes after assailants threw a grenade at the French embassy in Athens last week, slightly wounding an officer.
Several Athenians questioned the possible benefits of a visit by an outgoing president.
"He's just here for a stroll. Somebody else is taking over, and from a different political party at that, so there are no commitments binding (on his successor)," said pensioner Costas Bousgos.
After Germany, Obama concludes his trip with a stop in Peru for a summit of the Asia-Pacific Economic Cooperation forum (APEC) where he is expected to meet Chinese President Xi Jinping.