PROVO, Utah—The recent flurry of court rulings legalizing and then halting gay marriage in Utah has whipsawed residents of this predominantly Mormon city, a conservative enclave that saw its first-ever gay pride celebration only last summer.

For same-sex couples here who say they endure stares and whispers while walking hand in hand, news that they could suddenly marry was almost unbelievable, said Todd Markham, who wed his partner,...