Apparently, this is a good question. Everything I have read indicates that yes, depression can cause weight gain, but also that weight gain can cause depression. This circle means that until we take charge of either the depression or the weight, both have the potential to intensify.
When someone is depressed they often seek comfort in food. That sugar rush or carb load gives us a temporary mood elevation, but ultimately the sugar crash and the weight gain that follows brings us down, sometimes to a lower level than where we started.
How do we stop the cycle? A good place to start is exercise. Getting outside and going for a walk will help with both the weight and the mood. I have always heard that exercise is a mood elevator, but by taking control of your activity levels, you are also taking control of one part of your life. This small amount of control can change the way you feel about your weight. It will help you to feel happier and more successful and may encourage you to increase your activity level. Once a routine is established you may begin to make a move toward changing your eating habits as well. Hopefully, this will reverse the cycle and start you on a healthier, happier path.
NOTE: If you suspect that you have any signs or symptoms of depression, seek professional medical attention immediately. You should never self-diagnose or self-medicate.