The first step in building willpower is a small one, and it may seem inconsequential initially, but you can't complete a mental marathon after a lifetime of being a psychological couch potato. Initially, all one has to do is impose a short but concrete waiting period on gratifying desire. When your coworker offers you a brownie and you feel you can't resist, take it, but promise yourself to wait 15 minutes before taking a bite. After 15 minutes, have a bite, but be certain to fully inhabit the sensory experience of enjoying that bite. Smell the brownie, keep it on your tongue, and note the textural qualities. If you want to take another bite right away, put the brownie down and make yourself wait another five minutes before the next bite and, again, be sure to be extremely mindful of the experience of enjoying the next bite.
The next steps in building your willpower come from increasing the duration of the time you take delaying gratification. You can start with any time you like and just add five minutes to it whenever you feel you are ready. This may seem like a trivial exercise, but you are actually engaging in a type of behavior modification. You are building new pathways in your brain and training yourself to consider gratification in a different manner through time and small changes.
It's important to keep in mind that this sort of “training” works both ways. This mental muscle will slowly atrophy if you cease to flex it. If you stop delaying gratification and start simply gobbling things down again on a whim, your thinking will gravitate back to where it was before and you'll find yourself right back where you started from. If you keep it up, you'll find that your overall ability to simply walk away from all of those things which you wish you could say “no” to will slowly increase.