I'm right there with ya. I lost 70 lbs. I was running, biking, and weightlifting 6 days out of 7. Then I tore a ligament in my foot training for a race. I've gained 40 lbs in 9 months. But hey, I don't have to lose the 30, which for me is a huge victory. Every other weight loss attempt has ended with me gaining it all back plus 10.
You can't fail if you don't give up. And you haven't given up because you're here. You deserve a lot of credit for that. Like they say, fall down eight times, get up nine. Hang in there!