RICHMOND — Anthony LeCounte was a 17-year-old high school senior in Alexandria, gay but still in the closet, when Virginians voted by a wide margin to outlaw same-sex marriage.

By the time voters scrapped that 2006 ban in a referendum Tuesday, 20 years and a cultural revolution had come and gone. A Supreme Court ruling had, more than a decade earlier, rendered the ban defunct. And LeCounte had already celebrated seven anniversaries with the man he’d legally wed in the foothills of the Blue Ridge Mountains.