This is not so. God loves you even in your sin. He sent Christ to die in your place and to pay the penalty for your sin so that you can be reconciled to Him. You may think that you are a Christian because you are a faithful member of a church or have always tried to be a good person. But you could never do enough to deserve God's gift.
Grace means undeserved favor.
God graciously offers you what you could never do for yourself. All you need to do is receive it. Believe with all your heart that Jesus died for you to provide deliverance from your sins. He gave the right to become children of God, even to those who believe in His name. I believe that Jesus died in my place to pay the penalty for my sin and that He rose from the dead.