Let us say you found out somehow that an employee is gay. Maybe he mentioned his husband, the way many men talk about their wives. ("Any plans this weekend?" "I'm going to see my husband's family." This is not a graphic description of any bedroom activities and should not be conflated with such.)
Or in the case of a candidate, let us say you (as the hiring manager) did a social media search and found pictures of his wedding, in which he married another man.
Oops! You didn't know - and you didn't want to know - but now you do.
As a manager, are you legally allowed to let this affect your hiring decision?
As an employee, are you legally allowed to refuse to work with a gay employee?
My understanding, as someone born and raised in a Christian family, is that most Christians oppose homosexual sexual acts and by extension, homosexual marriage. But I have never heard of a religious justification to oppose working with a gay employee or hiring a gay candidate. As such, I don't think it's a question of religious freedom, but IANAL.