In the 5-4 decision, Justice Kennedy wrote the opinion of the court, saying the equal protection clause of the 14th Amendment to the Constitution requires states to issue marriage licenses to same-sex couples.
"Our nation was founded on a bedrock principle — that we are all created equal," the president said at the White House Rose Garden following the announcement of the decision in Obergefell v. Hodges.
President Obama speaks in the Rose Garden of the White House in Washington on Friday after the Supreme Court declared that same-sex couples have the right to marry anywhere in the United States.
Pablo Martinez Monsivais/AP
Obama said that, often, progress on the journey to equality "comes in small increments. Sometimes two steps forward, one step back."
"And then sometimes there are days like this, when that slow steady effort is rewarded with justice that arrives like a thunderbolt," the president said.
"When all Americans are treated as equal, we are all more free," he added, acknowledging that "Americans of good will continue to hold a wide range of views on this issue."
"For all our differences, we are one people — stronger together than we will ever be alone. That has always been our story," Obama said.
"Today, we can say in no uncertain terms that we made our union a little more perfect."