BERLIN—Martin Schulz, who is running to unseat German Chancellor Angela Merkel, drew loud applause at his party’s convention in June when he unveiled a core campaign promise: “We will achieve marriage equality in the next government!”

One day later, Ms. Merkel dropped her yearslong opposition to a parliamentary vote on same-sex marriage, stripping her opponent of campaign ammunition.

It...