HAMBURG, Germany — Germany has never had it so good. It is one of the healthiest, wealthiest nations on earth. Employment and exports are at record levels. Consumer and labor confidence are high. The country commands respect on the global stage not for its military prowess but for its economic and moral strength, while its chancellor is widely admired.

So how, all of a sudden, does a man from the left, whose agenda calls for an expansive welfare state, who is campaigning as the voice of the little guy and whose battle cry is, essentially, “Make Germany Fair Again,” have a real chance of unseating Chancellor Angela Merkel in the general election in September?

Martin Schulz, Ms. Merkel’s challenger, has revitalized Germany’s center-left Social Democratic Party almost literally overnight. Even a few months ago, before he announced his candidacy, it was lumbering at about 20 percent approval ratings, where it had been for much of the decade. Today, it is over 30 percent — a strong showing in a fractured political landscape with an insurgent far right. In some polls, if the election were held today, Mr. Schulz would just narrowly beat Ms. Merkel.

At first glance, his success is a mystery. Mr. Schulz made his career abroad, as a member and eventually president of the European Parliament — one of the very Brussels institutions that many Germans regard as elitist and out of touch.