I struggled with this for a couple of years. I diligently kept track of my expenses at the grocery store, but each month that last bill bumped me up over what we had agreed to spend. We tried increasing my budget- only to go over that one, too! We heard about the envelope system, so I gave it a try, and we found that it really, truly works! Dave Ramsey is a strong advocate of this method, as well.
We actually use one of those "coupon organizers" you can find for $1 at Target or a dollar store. Each month, I take the cash for our cash expenses (groceries, date night, etc), and put them each into it's folder. Once it's gone, it's gone. We can take the money out of another folder to cover an overage, but it doesn't get replaced until the new month begins. The cash that we start out with is all that's alloted, and we don't withdraw more. There's no more budget overages with this system!
Some people use this system and have it broken into a weekly or bi-monthly budget so they're not carrying around huge amounts of cash. Often, I'll take the money out of the folder at home that will cover the cost of my list, plus a little more if I stumble across a good deal. This is another way to prevent me from going over budget, or purchasing items we don't really need. And I'm not carrying a month's worth of cash around the store!
If you struggle with staying within your budget guidelines, give this method a try. We've done some tweaking over the years, adding or changing categories and adjusting how much goes into each folder. It's not static, so it may take a couple of months to get it all working for you. But the simplicity of it makes it an incredibly useful tool for managing your cash expenses.