The short answer is that on June 26, 2015, the United States Supreme Court (SCOTUS) in a landmark ruling, by vote of 5–4, decided that the fundamental right to marry shall be extended to same-sex couples under the Due Process Clause of the United States Constitution as well as the 14th Amendement's Equal Protection Clause of the United States Constitution.
The case is additionally notable because it received the most amici curiae briefs (148) in SCOTUS history, more than any other past SCOTUS case up to the Obergefell case. These briefs are briefs submitted as "friends of the court"; in other words, non-litigants were submitting briefs to the Court for consideration in how they ruled on the issues.
Further notable is that this opinion was delivered on the second anniversary of the landmark Windsor case that struck down § 3 of the Defense of Marriage Act, as well as the twelfth anniversay of Lawrence v. Texas, the case that struck down sodomy laws in 13 states.
Without going too much into the details, the case resulted as a combination (a "consolidation" in lawyer speak) of six separate lawsuit in various different states, including Michigan, Ohio, Kentucky, and Tennessee. Sixteen same-sex couples were involved in this landmark litigation.
When SCOTUS accepted the appeals, they posed two main questions to the litigants:
Does the 14th Amendment require a state to license a marriage between two people of the same sex?; and
Does the 14th Amendment require a state to recognize a marriage between two people of the same sex when their marriage was lawfully licensed and performed out-of-state?
SCOTUS found that the answer to both of the above questions were a resounding "yes".
Justice Anthony Kennedy ended the case's majority opinion with the following poignant conclusion:
No union is more profound than marriage, for it embodies the highest ideals of love, fidelity, devotion, sacrifice, and family. In forming a marital union, two people become something greater than once they were. As some of the petitioners in these cases demonstrate, marriage embodies a love that may endure even past death. It would misunderstand these men and women to say they disrespect the idea of marriage. Their plea is that they do respect it, respect it so deeply that they seek to find its fulfillment for themselves. Their hope is not to be condemned to live in loneliness, excluded from one of civilization's oldest institutions. They ask for equal dignity in the eyes of the law. The Constitution grants them that right.