Sexual orientation is a protected class, where laws seeking to deny gay Americans their civil liberties, for example, are subject to one of two levels of judicial review, rational basis or intermediate scrutiny.
Marriage is not a civil liberty.
Of course you can't deny someone civil liberties because they are gay.