Lorie Smith, owner of website design firm 303 Creative, challenged a Colorado state law that prohibits businesses from discriminating on the basis of gender, race, religion or sexual orientation.
Smith said that creating marriage announcements for same-sex couples would be "inconsistent" with her Christian beliefs and being compelled to do so would violate her First Amendment free speech rights.
On Friday, June 30, the Supreme Court ruled 6-3 in her favor.
Colorado "seeks to use its law to compel an individual to create speech she does not believe," Justice Neil Gorsuch wrote in the decision backed by all of the top court's conservatives.
"That principle would allow the government to force all manner of artists, speechwriters, and others whose services involve speech to speak what they do not believe on pain of penalty," Gorsuch wrote.
The decision focused on a limited category of commercial activities, like artists or businesses those creating content.
But leading the dissent of the court's three liberal justices, Sonia Sotomayor warned that it risks being applied to any business as part of a wider "backlash" to the moves toward LGBTQ equality.
"Today, the Court, for the first time in its history, grants a business open to the public a constitutional right to refuse to serve members of a protected class," she wrote.
President Joe Biden on Friday criticized the Supreme Court ruling as "disappointing."
"I'm deeply concerned that the decision could invite more discrimination against LGBTQI+ Americans. More broadly, today's decision weakens long-standing laws that protect all Americans against discrimination," he said in a statement.
The case grew out of a campaign by a conservative Christian group, the Alliance Defending Freedom, fighting against Colorado's strict anti-discrimination laws.
In arguments last December, Kristen Waggoner, who heads the Alliance, said the state law would force Smith to "create and speak messages" she does not believe in "on pain of investigation, fine and reeducation."
"When you're requiring a speaker to create a message to celebrate something that they believe to be false you're compelling their speech," said Waggoner.
The case closely resembled one from 2018 when the Supreme Court partially ruled in favor of Colorado cakemaker Jack Phillips, also a devout Christian, who had refused to make a wedding cake for a gay couple.
But the court in that case narrowly ruled against Colorado's Civil Rights Commission, saying that its actions requiring Phillips to make a cake with a message he didn't believe in had infringed on his religious rights.
The court did not rule on whether Phillips had the right to discriminate against the couple by denying them business as a gay couple.
Waggoner and the Alliance also represented Phillips in that case.
Editors Note: This article was updated to rewrite the headline.