If I think about my plan of food action before going into any food/social situation. Having thought about it, I don't get caught off guard and am better at sticking to my guns.
Some people will finally give into the "just have a piece!" and take the piece. In a large group of people most won't notice if you actually eat it or not. You can either mush it around on your plate and then throw away/abandon your plate somewhere, take a bite and mush the rest around, or just walk away and abandon it without even touching it. You could also claim something like "I'm so full right now, I just couldn't eat another bite after that delicious dinner you server me." "I didn't realize food was being served and ate before I came. I wish I'd saved room, xyz smells delicious!" (Compliment them on something else. Also, people seem to respond better if you're "full" than if you're "trying to eat healthily").
If they persist, ask to have a piece/serving/whatever wrapped up b/c you're full, and ditch it in the first trash can you see after you leave the place.
People also seem to respond better to medical reasons:
Tell them you're allergic. Many people won't even ask to what!
Tell them you're diabetic. Not trying to make light of people who are genuinely diabetic at all.
Tell them you have Celiac's disease (can't eat gluten). Again, not trying to make light of people you have Celiac's disease.
Make up the name of a disease and tell them that you have that. If they want to know more about it, just tell them you really prefer to discuss it only with your doctor.
Practice saying these things to yourself. Sounds goofy, but it will help you be prepared. Also I'm not a liar my nature, truly, but there are white lies I'm willing to tell for the sake of my waistline and to avoid hurting people's feelings.
I seem to go to a lot of social events where people are trying to push alcohol on me, people I don't know as well and close friends, too. Even if they'll give up trying to get me to eat the cake they want me to have some wine.

They just want to see something in your hand - doesn't have to be alcoholic. If it's an open bar, make a "drink" for yourself of a diet mixer and slice of lemon/lime etc. If you're at the bar, ask the bartender to put some non-caloric beverage in an alcohol glass and garnish it as alcohol. If it's BYO, just make up something with fizzy water or fizzy diet soda, garnish it with a lime/lemon or mint sprig or something, and then just smile coyly and change the subject if people question you about what you're drinking. If you end up with alcohol in your hand, don't drink it, and abandon it somewhere. Or dump it out in the bathroom and refill with water. I've even lied to my BF about having alcohol in my glass, just to get him to back off! (I just want to clarify that he is a wonderful man, and I am not a deceitful person. This is the only lie I've told him in 4 years of dating.)
Didn't mean to hijack the thread with talk of dealing with alcohol pushers, just thought some out there might be helped by hearing those tips - it's hard to try and avoid alcohol when you're in your 20's. It's everywhere!