Directors at the Ashers Baking Company have insisted they did not know what sexual orientation the customer was when declining his order.
The McArthur family (above), who run Ashers, are seeking to overturn a court judgment which found they acted unlawfully by rejecting the order placed by gay rights campaigner Gareth Lee (below) in 2014 based on their Christian conviction that the slogan was sinful.
Commission lawyer Robin Allen QC said: "Mr Lee wanted to be associated with the class of person who have same sex orientation by purchasing this cake.
"He was not allowed to do that by the defendants.
"They would have allowed him to be associated with persons of opposite sex orientation by, for instance, letting him have a cake which did not have the word gay on it."
"If you are gay you have lived in a world of prejudice for a very long time and you want to be able to engage with the world without it mattering a hoot what your sexual orientation is."
"They were objecting to the use of a particular sexual orientation in that message and that is what made it direct discrimination, because of that objection."
Ashers' owners were ordered to pay £500 damages after a county court judge ruled they directly discriminated against Mr Lee after refusing to make him a cake (below) featuring Sesame Street puppets Bert and Ernie with the phrase 'Support Gay Marriage' for a private function marking International Day Against Homophobia two years ago
Mr Lee, a member of the LGBT advocacy group Queer Space, paid the £36.50 in full at Ashers' Belfast city centre branch but received a phone call two days later and was told the company could not fulfil his order.
David Scoffield QC represented the McArthur family at Belfast's Court of Appeal and said the person who took the order had no idea what Mr Lee's sexual orientation was and had never heard of Queer Space.
He said the alleged discrimination was not against Mr Lee but the specific message on the cake.
Ashers Baking Company is named after the tribe of Asher, one of the twelve tribes of Israel in the Old Testament.
Asher means "happy one" in Hebrew.