Stephanie Coontz's history of marriage is worth a read:
The redefinition of traditional marriage began about 250 years ago, when Westerners began to allow young people to choose their partners on the basis of love rather than having their marriages arranged to suit the interests of their parents. Then, just 100 years ago, courts and public opinion began to extend that right even to marriages that parents and society disapproved.
In the 1940s and 1950s, many states repealed laws that prevented particular classes of people—including those with tuberculosis and "the feeble-minded"—from marrying. In 1967 the U.S. Supreme Court ruled it unconstitutional for states to prohibit interracial marriage. In 1987 it upheld the right of prison inmates to marry.
The path to same-sex marriage was further opened up when heterosexual couples began to push back against state control over their sexual and reproductive lives. Until the 1950s, some states forbade married couples from using assisted reproduction to have children, ruling that artificial insemination was tantamount to adultery and any resultant child was illegitimate. Conversely, until the Supreme Court ruled in 1965 that couples had a right to sexual privacy, many states refused to allow the sale of birth control to married couples who wanted to prevent or limit their childbearing.