Lawmakers in Berlin's glass-domed Reichstag had elected her with a margin of 364-315 with nine abstentions.
Merkel, wearing a necklace in the national colors black-red-gold, nevertheless beamed with joy and relief as applause filled the Bundestag chamber, where her scientist husband Joachim Sauer and her 89-year-old mother Herlind Kasner were among the well-wishers.
The vote in parliament Wednesday morning ends nearly six months of political turmoil after a federal election saw millions of voters desert the two mainstream parties - Merkel's CDU and the Social Democratic Party (SPD) - turning instead to parties on the left and right.
The same coalition has governed since 2013.
He has served in a succession of party and government jobs as a loyal aide to Merkel, and has previous experience of managing energy policy from a stint as environment minister.
Trump fires top diplomat Tillerson ahead of North Korea talks
A retired army officer, he is a former conservative Republican member of the US House of Representatives from Kansas . A number of details still need working out ahead of the summit, from the time and place to the actual agenda.
"The chancellor was, from time to time, written off in the past six months", Marianne Kneuer of Hildesheim University told Phoenix TV.
A conservative ally of German Chancellor Angela Merkel said on Tuesday that if Russia fails to cooperate in the investigation into a nerve agent attack on a former Russian double agent in Britain, there should be a joint Western response.
To be re-elected, Merkel needed the support of a majority of all lawmakers.
The deadlock was the longest Germany has seen since World War II.
Merkel's spokesman Steffen Seibert said the German leader had condemned the attack and assured May in a telephone call that she was taking the British government's views on possible Russian involvement in the attack extremely seriously.
But her authority was dented by her decision in 2015 to commit Germany to an open-door policy on migration, resulting in an influx of more than one million people. She is one of a handful of political veterans who made it into government, along with Horst Seehofer as interior minister and Olaf Scholz in finance.