There is a limit to fellowship with unbelievers.
Be not deceived: evil communications corrupt good manners.
1 Corinthians 15:33 KJV
Fellowship with unbelievers is allowed for these conditions:
1. To save lost souls
And it came to pass, as Jesus sat at meat in the house, behold, many publicans and sinners came and sat down with him and his disciples. But when Jesus heard that, he said unto them, They that be whole need not a physician, but they that are sick. But go ye and learn what that meaneth, I will have mercy, and not sacrifice: for I am not come to call the righteous, but sinners to repentance.
Matthew 9:10, 12-13 KJV
2. To glorify God
If any of them that believe not bid you to a feast, and ye be disposed to go; whatsoever is set before you, eat, asking no question for conscience sake. Whether therefore ye eat, or drink, or whatsoever ye do, do all to the glory of God.
1 Corinthians 10:27, 31 KJV
Jesus example:
Jesus ate with the Pharisee but rebuked him at verse 40.
And one of the Pharisees desired him that he would eat with him. And he went into the Pharisee's house, and sat down to meat. And Jesus answering said unto him, Simon, I have somewhat to say unto thee. And he saith, Master, say on. There was a certain creditor which had two debtors: the one owed five hundred pence, and the other fifty. And when they had nothing to pay, he frankly forgave them both. Tell me therefore, which of them will love him most? Simon answered and said, I suppose that he, to whom he forgave most. And he said unto him, Thou hast rightly judged.
Luke 7:36, 40-43 KJV
I don't think the Pharisee invited Jesus again after that. If you stand by the truth and when God sees that a person has no hope or whatever His reason is, God will eventually separate you from the world because fellowship with the world can influence you negatively. Going to a gay wedding is not glorifying God so it is acceptable to separate. If Jesus passed by and happened to catch you on what you were doing at the gay wedding, would you be fine? That's only between you and God.