I believe the issue is that by passing a law prohibiting granting a marriage license to a same-sex couple, a State is violating that couple's Fourteenth Amendment right to life, liberty, and equal protection, among other things.
I will admit that there were a lot of high-soaring words that might have covered up the legal basis, but to me, the legal component of the ruling was simply:
1) The court finds that marriage is an inherent part of life and liberty (arguably the shakiest part)
2) A State passing a law prohibiting marriage by one specific group of people is taking away their rights of life and liberty
3) Therefore, said law is found to violate the Fourteenth Amendment which grants life, liberty, and equal protection under the law to all United States citizens, and is thus unconstitutional.
I think that's the Best TL;DR; of the ruling I've found so far.
#1 was found by the court almost 80 years ago in Loving vs Virginia[1]. What the court found was that this applied to the rights of same sex couples.
The court has been building the legal framework for this for about a decade. They found that Civil Unions must not be legally different from Marriage. From there it was a simple matter of ruling that existing civil rights rulings did in fact apply to LGBT folks.
I will admit that there were a lot of high-soaring words that might have covered up the legal basis, but to me, the legal component of the ruling was simply:
1) The court finds that marriage is an inherent part of life and liberty (arguably the shakiest part)
2) A State passing a law prohibiting marriage by one specific group of people is taking away their rights of life and liberty
3) Therefore, said law is found to violate the Fourteenth Amendment which grants life, liberty, and equal protection under the law to all United States citizens, and is thus unconstitutional.