The ordered cake's decoration was supposed to bear the image of Sesame Street puppets Bert and Ernie, arm in arm with the phrase "support gay marriage," but the bakery refused to make it and now faces legal action.
Asher's Baking Company, a Christian-run bakery in Northern Ireland, refused to bake the cake because the message of the cake went against the religious convictions of the owners.
This was followed by the Equality Commission for Northern Ireland writing to the firm saying it was breaking the law, The Independent newspaper reported on July 8.
The commission claimed that refusing to print the cake amounted to discrimination on grounds of sexual orientation against the man who placed the order.
The proprietors said that baking the cake would mean endorsing the campaign to support gay marriage in Northern Ireland.
The cake was intended for an event to mark International Day Against Homophobia and Transphobia.
Customer Gareth Lee wanted the cake to also bear the logo 'Queerspace,' after a Belfast-based organization campaigning for equal marriage.
Unlike the British mainland, gay marriage is not legal in Northern Ireland.
Asher's decision triggered reaction from some personalities and organizations.
Andrew Muir, Northern Ireland's first gay mayor, when he headed North Down, said "businesses should not be able to pick and choose who they serve," the Belfast Telegraph reported.
The Equality Commission for Northern Ireland in its letter ordered the bakery firm to fix "illegal discrimination" within seven days or be taken to court by the commission.
But Asher's remains confident with its decision to refuse the job.
Daniel McArthur, general manager at Asher's, explained that the firm was founded by Christians and the current directors are Christians.
"That means that we run our business according to Christian values and beliefs, according to what the Bible teaches.
"It means for example that we don't open on Sundays; that we trade openly and honestly with people," he said.
Last year, a bakery in the U.S. state of Oregon, refused to make a wedding cake for a lesbian couple.
The bakery's owners faced hundreds of thousands of dollars in fines after being found guilty of violating the couple's civil rights.