Need motivation to get back into it...

Hi :)

I had gone down from 371lb to 245lb about 18 months ago, but due to a back injury (and poor diet choices at times) I have gained back 20lb and am now 265lb. Last week I had Facet Joint Injections in my back and these have stopped the pain for the most part so I am wanting to re-lose those 21lb as well as a further 20lb. I had my first gym session this morning and while I did enjoy it and have missed the feeling it gave me, I still feel like I need some kind of motivating to keep it up.

Is there anybody else who initially lost a large amount then gained some back and lost it again? How did you stay motivated and focused the second time around?

Thank you :)