Understanding your relationship to food and triggers for over eating are also important. If you are eating healthy food but are still over-consuming then yes you will put weight back on.
But diet would rank about 70% of the equation for weightloss in my books since you can workout but then easily put back on the calories that you just took off if you are not being smart.
RE: Reaching Goals - Fat to Fit [part 1]