The Equal Protection Clause of the 14th Amendment to the U.S. Constitution provides for equal protection of all laws, meaning a state can't prefer one class of people over another class in the application of its laws.
Ratified after the Civil War, the Equal Protection Clause was designed to prevent the racially-discriminatory application of laws, but it was initially interpreted as allowing for racial segregation.
The Supreme Court ruled in "Brown v. Board of Education" that segregation is inherently unequal and in violation of the Equal Protection Clause. This ruling prompted the use of the Equal Protection Clause as a basis for a wide range of civil rights challenges.
The Equal Protection Clause is often cited in challenges to laws that violate same-sex marriage and civil union rights. Generally, a state must show a rational basis to a legitimate state purpose for discriminating against a particular class of people. To pass constitutional muster, a state would have to prove that its laws banning marriages between same-sex couples are a rational means of accomplishing a valid purpose.
Proponents of same sex-marriage argue that prohibiting it violates the equal protection clause; it discriminates against gay men and lesbians by denying them the right to marry, while heterosexual men and women can marry freely and that there's no basis for this different treatment under the law.
Opponents of same sex marriage contend, among other things, that there's a rational basis for prohibiting same sex-marriage because doing so promotes stability in relationships between men and women.