With support for gay marriage on the rise, the GOP’s opposition to it is becoming a political liability.