I am a morbidly obese black man with a Ph.D. in neuroscience, which is an elite group, but not by choice. Welcome to Largely Speaking. Here, I will speak from my head and my heart about overcoming compulsive overeating, obesity and its collateral concerns and consequences. That said... onward.
If the brain were a television network, compulsive behavior would be a reality show called Habits Gone Wild. Fortunately, the brain is not a TV network, and compulsive behaviors are merely habits. Habits are simple forms of frequently repeated learning that often occur subconsciously. For example, when you walk into a dark room, you flip the light switch because you want to turn on the light,and you know flipping the light switch accomplishes this. This is goal-oriented behavior, i.e., you flip the switch to achieve the goal of having more light. Thus, consequence drives goal-directed habits.
However, have you ever forgotten to change a bad bulb? Yet, every time you walk into that room, you flick the light switch anyway. This is a stimulus-response habit. The stimulus of entering a dark room causes the automatic response of flipping the light switch. Therefore, stimulus-response habits differ from goal-directed habits because the stimulus motivates them rather than the outcome.
Normal eating is goal-directed behavior; compulsive overeating is not. Compulsive overeating is a complex stimulus-response behavior. The stimulus varies (boredom, anger, happiness, sexual frustration, anxiety, and emotional triggers, etc.). The strength of the response may also differ. It could range from eating until your stomach feels slightly uncomfortable to eating until you vomit. Regardless, at the end of the day, compulsive overeating is just a goal-directed habit that has become a stimulus-response habit running amuck.  How does this neuro-drama unfold in the brain?
Once neuroscientists believed goal-directed habits began as decisions in the prefrontal cortex (in the thinking part of the brain) and repetition caused them to encode as stimulus response habits in the dorsal striatum (in the doing part of the brain).  Thus, when you first decide to exercise every morning, you have to think about it. However, after a while when you wake up in the morning you automatically start exercising without thinking about it because repetition has caused encoding in dorsal striatum. 
This theory rang partly true, but I knew it could not be whole the truth. Far too many of my diet and exercise decisions had not encoded as stimulus-response habits. I was always deciding to exercise more and eat better, only to find myself sitting in front of the television with a Big Mac on my breath. Where was my prefrontal cortex (PFC) and dorsal striatum when I was going from "no pain no gain," to "no pickles no onions"?
As it turns out, goal-directed behavior does not always begin in the PFC. Two sources of goal-directed behavior contribute to habit formation in the dorsal striatum: the PFC, and the ventral striatum, which is a part of the reward system. True, when the PFC initiates goal-directed behavior, the more it repeats the more deeply it encodes. However, when the ventral striatum generates goal-directed behavior, dopamine (the brain's happy-dance drug) releases in both the ventral and dorsal striatum.  This makes the dorsal striatum much more likely to repeat the action than when the PFC initiates the action because the brain loves dopamine. However, the dorsal and ventral striatum use dopamine differently. In the dorsal striatum, dopamine initiates action. In the ventral striatum, it signals reward via incentive salience. 
Incentive salience is your brain's reward utility. It makes you want to do something by reminding you, of how rewarding it was or will be, and then releases dopamine on anticipation of that reward. For example, you want to eat because you remember or imagine the satisfactions of eating. More dopamine releases from wanting to eat than from actually eating because in the brain's reward game, winning is making you want to do something enough to do it. Once that happens, the game is over. Thus, the larger dopamine releases from wanting to eat makes wanting to eat more pleasurable than eating because dopamine, not food, is the brain's drug of choice. Hence, compulsive overeaters will eat beyond the point of pleasure. The larger dopamine rewards from wanting to eat drives the compulsive behavior, not the rewards of actually eating. 
In normal eaters, the PFC imposes impulse control. "Stop eating, your blood-type just changed to chocolate." However, if you have PFC damage, reduced serotonin, major life distractions or excessive stress, the PFC's impulse control ability decreases. The inability of the PFC to exercise control allows the hedonic goal-oriented habit of wanting to eat in the ventral striatum to become a compulsive stimulus-response habit in the dorsal striatum. 
Since the normal eaters' prefrontal cortexes are capable of imposing impulse control, often he or she cannot understand why compulsive overeaters cannot do the same.  This is why people think compulsive overeating is a character flaw. Regrettably, this stigma erodes self-esteem, thereby increasing stress, which further decreases serotonin, further compromising PFC function, while feeding the striatum dysfunction underlying compulsive overeating.
Habit formation is key part of compulsive overeating, but it is only a part of the problem. Some of the science is simple, much of it is complex, and even more remains unknown. Some of it is specific to compulsive overeaters, and other parts generically human. Likewise, human neuroanatomy is basic, but context guides its expression. Hence, I speak from my head as a neuroscientist and from my heart as a recovering compulsive overeater. It is necessary to speak from both, because the science of medicine resides in the head and the art of healing lies in the heart. Remain fabulous and phenomenal!
1. Front Neuroendocrinol. 2010 Jan;31(1):85-103. doi: 10.1016/j.yfrne.2009.10.003. Epub 2009 Oct 12. Appetite and reward. Fulton S.
2. Neuroimage. 2013 Mar;68:162-72. doi: 10.1016/j.neuroimage.2012.12.003. Epub 2012 Dec 13. Functional integration processes underlying the instruction-based learning of novel goal-directed behaviors.
Ruge H1, Wolfensteller U.
3. Biol Psychiatry. 2014 May 15;75(10):817-24. doi:10.1016/j.biopsych.2013.08.026. Epub 2013 Oct 4. A selective role for dopamine d4 receptors in modulating reward expectancy in a rodent slot machine task. Cocker PJ1, Le Foll B2, Rogers RD3, Winstanley CA4.
4. PLoS Comput Biol. 2009 Jul;5(7):e1000437. doi: 10.1371/journal.pcbi.1000437. Epub 2009 Jul 17. A neural computational model of incentive salience. Zhang J1, Berridge KC, Tindell AJ, Smith KS, Aldridge JW.
5. Neuron. 2014 Jan 8;81(1):207-17. doi: 10.1016/j.neuron.2013.10.019. Epub 2013 Dec 12.Between thoughts and actions: motivationally salient cues invigorate mental action in the human brain. Mendelsohn A1, Pine A2, Schiller D3.
6. Biol Psychiatry. 2014 Feb 24. pii: S0006-3223(14)00106-1. doi: 10.1016/j.biopsych.2014.02.011. [Epub ahead of print] Neuregulin-3 in the Mouse Medial Prefrontal Cortex Regulates Impulsive Action. Loos M1, Mueller T2, Gouwenberg Y3, Wijnands R1, van der Loo RJ1, Birchmeier C2, Smit AB3, Spijker S4
7. http://www-psych.stanford.edu/~knutson/rab/drevets01.pdf (Drevets et al)
8. Nature Reviews Neuroscience 7, 464-476 (June 2006) | doi:10.1038/nrn1919 The role of the basal ganglia in habit formation Henry H. Yin1 & Barbara J. Knowlton