An estimated 56,000 mainly Jewish people perished at the Buchenwald concentration camp before it was liberated in April 1945.
Speaking with Holocaust survivor Elie Wiesel and Merkel at his side, Obama said concentration camps have "not lost their horror" and he vowed never to forget what he saw.
The concentration camp "is the ultimate rebuke" to those Holocaust deniers, said the U.S. president, adding that people must stand vigil against a repeat of the atrocity.
Merkel meanwhile stressed that the memory of the Holocaust has become a part of the "reason of state" of Germany.
"From the history arises the responsibility to combat terrorism, extremism and anti-Semitism and to campaign for peace, freedom and democracy," said the German leader.