I have been using Cookie Monster in Firefox for a while now to great satisfaction. However, I haven't found a way to allow cookies like Google's on Google's services but block them when I visit other sites that integrate with Google (or Facebook etc.)
Opera can do it built-in. (The OP didn't state whether he's seeking solution strictly for FF or considering wider alternatives.)
Safari blocks third-party cookies by default. If you want to check your settings, click the gear icon and go to Preferences >> Security; under "Accept cookies", it should say "Only from sites I visit". Click OK.
Firefox (without Cookie Monster) blocks third-party cookies if you untick the checkbox saying "Accept third party cookies". You can get there from Options >> Options >> Privacy.
The RequestPolicy extension for Firefox can be configured to block those third-party requests (including cookies, but also the requests themselves).
Internet Explorer allows you to block third-party cookies. Go to Tools >> Internet Options >> Privacy >> Advanced. Tick the box labelled "Override automatic cookie handling". Next to "Third-party cookies", select "Block". Then click OK.
Opera allows you to block third-party cookies. Go to Tools >> Preferences >> Advanced, select "Cookies" on the left, then select "Accept only cookies from the site I visit". Click OK.
Chrome allows you to block third-party cookies. Go to the wrench icon >> Options >> Under the Bonnet >> Content Settings >> Cookies, and tick the box labelled "Block all third-party cookies without exception". Click OK.