Well, not only that but it's extremely difficult to get a law applied ex post facto like that. For example, if there is no law against breaking and entering where you are, and you break into a house and steal some shit, then the local government passes a law against breaking and entering, they can't then come and arrest you for it. You can't commit a crime before it's a crime. The case with marriage gets murkier, especially if there are no penalties proposed, because it would be a civil matter that didn't intend to cause measurable harm to the subjects (although having your marriage suddenly dissolved because some jackass got elected into the White House on the basis of a crusade against you could be construed as harm).
Marriage is a civil matter, so it wouldn't be unconstitutional to pass one, but it would still be damned hard.