But Romney’s opposition to the measure is striking because he was known for holding anti-gay views and support for a U.S. constitutional amendment banning same-sex marriage during his presidential campaign.