The devil will always try to turn us away from God; after all, this is the main thing he wants to accomplish in our lives. And one way he does this is by probing for our weak spots and trying to take advantage of them.
But don’t blame everything on the devil; he doesn’t deserve all the credit! The real problem, I suspect, is that after you gave your life to Jesus you thought this was the end, and it was all you needed to do. You knew your sins were forgiven, and you knew as well the reality of the Bible’s promise that “God has given us eternal life, and this life is in his Son. He who has the Son has life” (1 John 5:11-12).
But afterward you never did anything to strengthen yourself spiritually — and over time you became spiritually weak. Just as a newborn baby needs food and warmth in order to survive and grow, so you needed spiritual food and warmth — the “food” of the Bible and prayer, and the “warmth” of fellowship with other believers. If these were missing, your spiritual life inevitably suffered.
God has not abandoned you; He loves you and yearns for you to grow stronger in your faith. Confess your weakness to Him, and then take time each day to be alone with God in His Word and in prayer. In addition, ask Him to lead you to a church where Christ is central, and where you can grow in your faith.