God loves all people, because God is love. God even loves his enemies (as he commands us to) and those who are steadfastly opposed to him. He loves Hitler, and Stalin, and pedophiles, and prostitutes, and murderers of the most ghastly sort. This, however, is not to say that everyone is going to heaven. Some don't want to spend an eternity with God by their own choice. And we can do things that sever us from our relationship with God. Just as committing adultery can sever the relationship between spouses by that very fact (although they remain married), so certain sins, we call them "mortal sins", are a deliberate choice on the part of the individual to do something they know is gravely against God's law.
Those with same-sex attraction are loved by God like everyone else. They deserve our compassion and understanding. Same-sex attraction is not a sin; it is a disorder and tends toward sin, but it is not a sin itself.
Homosexual behavior, however, is a sin, and a grave one. Those who participate in it freely, knowingly, and deliberately separate themselves from God. However, we cannot judge hearts;
if there is something lacking in the free, deliberate, or knowing nature of the act, then it does not separate someone from God. Only God knows the heart and what they've been through and what their state of mind is. There may be some psychological reason that prevents them from freely engaging in the act. Compulsions and addictions are good examples.
So we can say that homosexual behavior is a grave sin which, like many other sins, such as:
- pre-marital sex
- contraception, and
- missing Mass on Sundays
can separate us from God eternally. But there is always mercy available from God for those who, moved by grace, turn from sin and toward him; he is the merciful God who loves mankind.