BERLIN — Angela Merkel’s re-election as chancellor of Germany was supposed to be the ceremonial capstone of a year in which Europe did better than anticipated in holding off a populist surge, especially after the new French president, Emmanuel Macron, won so decisively over the National Front of Marine Le Pen.

Instead, the election results on Sunday showed that the alienation with mainstream consensus politics has hardly gone away. Support for centrist parties, including Ms. Merkel’s Christian Democrats, eroded badly, as the far-right Alternative for Germany party received 12.6 percent of the vote.

Even if the far right was contained this year, it broke significant barriers in Europe’s core, making it to the final round of the presidential elections in France and now shattering a post-World War II taboo in Germany by entering the parliament.

It has gained a powerful place from which to alter the agenda of European politics. The far right’s gains in Germany will now complicate not only the calculations of Ms. Merkel, the de facto leader of the European Union, but by extension the path ahead for the entire bloc.