There has been a surge in sectarian violence since 2012 when fighting broke out in Rakhine State, home to about 800,000 Rohingya Muslims who were made stateless by a law passed in 1982.
''I am concerned, as are so many others, when I hear of the ongoing violence between Buddhists and Muslims in your country,'' Mr Gauck said in a speech at Yangon University, during an official visit to Myanmar.
At least 167 people died in the 2012 clashes, and 120,000 were made homeless, most of them Rohingyas.
''Just like other minorities, the Rohingyas belong to Myanmar,'' Mr Gauck said.
Myanmar government officials and many Myanmar Buddhists regard the Rohingyas as migrants from neighbouring Bangladesh, whose ancestors were brought to the Rakhine as labourers by British colonialists. The 1982 Citizens Act excluded the Rohingyas from the country's list of 136 recognised minority groups.
''I welcome all efforts to grant them a solid legal status as well as the prospect of self-determination within your country,'' Mr Gauck said.
Mr Gauck arrived in Myanmar on Monday, marking the first such presidential visit in 28 years. Richard von Weizsaecker was the last German president to visit Myanmar in 1986.
Mr Gauck's visit coincides with the 60th anniversary of diplomatic relations between the two countries. Mr Gauck on Monday met with Myanmar President Thein Sein in Nay Pyi Taw, the capital, where the German president praised democratic reforms undertaken after the general election of 2010.
Thein Sein reportedly thanked Germany for its aid for the development of Myanmar during the 60-year period of their diplomatic relations. He ''acknowledged the German government's rightful stand against the intense pressures from some Western countries on Myanmar in the past 20 years,'' the state-run New Light of Myanmar newspaper reported.
Prior to 1988, Germany was the second-largest aid donor to Myanmar after Japan. Myanmar was under junta rule between 1988 and 2010, when it was the target of economic sanctions by Western democracies for its poor human rights record and refusal to hold elections.
The European Union dropped most of its sanctions against the country in 2012, following the holding of a by-election that brought opposition leader and Nobel laureate Aung San Suu Kyi back into the country's mainstream politics.
Myanmar exports to Germany in the fiscal year 2013 amounted to US$42.98 million (1.4 billion baht), while imports from Germany were worth $144.55 million, up 51.97% compared with fiscal 2012 figures, The New Light of Myanmar reported. Myanmar's main imports from Germany were machinery, electronics, pharmaceuticals, transportation devices and scientific tools.