I lost a lot of weight (a lot, 6 1/2 stones), and I've kept it off other than around 1/2 stone that cycles on and off, eg at Christmas. It's now 8 years since I started the "diet" (I'd say lifestyle) that worked.
If my weight starts to drift up wards is always for the same reason... I've started to eat more carbs than my metabolism can handle. I am utterly convinced that some people (a lot of people) have huge, pardon the pun, problems with food because of a real, physiological problem with carbs/sugar driving appetite and mental issues that lead to binging and overeating.
I spent 20 years (since teens) dieting and feeling a failure and eating "healthy low fat" (high carb). I got really sick, and very fat. I felt hungry all the time. I had to eat every 2 hours or so as my blood sugar would plummet and I'd feel so sick and weak (hypoglycaemia).
The life style that changed that (and my health, completely), was low carb, then low carb and grain free.
It's about eating the foods we evolved to eat (and it might surprise you to find out grains are a fairly recent addition to the human diet, especially in the amounts we eat them today).
Fish, meats, eggs, nuts seeds. Lots and lots of leafy veg, dairy in small amounts if you don't react to it... This will level your blood sugars, stop you getting the huge bs spikes and crashes many people get after eating carb heavy food, that leads to constant snacking. I can go many hours between meals now without feeling sick/ill (just a bit of normal hunger), obviously that makes losing/keeping weight off easier!
The best advice I can give, go and read Marks Daily Apple blog, it's free, it has a great archive of articles, with links to scientific citations, but explained in easy terms. It's a great starting point... Good luck! :)