A business will have a very difficult time asserting “religious objection” in a way that satifies the courts. Businesses are generally “public accomodations,” and homosexuals are a protected class.
Believe it or not, a private business may have an easier time doing this than many religious organizations. If a business is set up as a partnership or a closed corporation (i.e., it is not publicly traded) and its religious identity is written into its bylaws, it actually has a very strong leg to stand on in a legal case. This is why Hobby Lobby was successful in their ObamaCare appeal, while many religious organizations that get tons of government funding were not.