Sounds like your family isn't the best about food. Mine isn't either. My husband and I (under my authoritarian rule) only eat healthy food, and that is what we have ALWAYS fed the kids. My husband used to complain about the diet, but now that he's 40, thin and healthy while his twin brother is obese and has many health issues, he quit complaining and actually prefers healthy meals now. All of our parents and step parents (all the kids grandparents) are old school bad eaters.
Giving your kids junk food when they are tiny is how you TRAIN THEM to like it before they know better and before they do their own shopping. You said yourself, she "used to get that food until it was a problem". She's only 6. If she ate so much of that food she started gaining weight and got hooked on it, then that is 100% your doing. I'm not bashing you, just pointing out that your emphasis in your mind seems to be a little too much on "her having a problem". She definitely does have a problem, but knowing you caused it will give you the strength to stay the course fighting it.
6 year olds don't understand broad notions about responsibility like, "The food is bad so you shouldn't eat it." My one kid has a major sweet tooth. He's been hearing sweets are "bad for your body and only for treats" since he was born, and you know what? He would eat ten tons of chocolate in one sitting if he got a hold of it. He's not old enough to care about health. He's having a good foundation built for him, but it's all about not having the food around. My daughter is 5. She wants to go to a party for whatever reason: someone rented a bouncy castle or whatever. She's too young for, "understanding it's for friends and family and supporting people" My sweet tooth guy would be there for the cake too, and he has polished off like 5 pieces of cake at parties when I wasn't paying attention. And for the record ALL of their grandparents feed them junk food. Which is why I'm glad they live far away and we don't see them much.
The only way to enforce healthy eating is to
A) Only have healthy food in the house. Only serve healthy food, and only have her see you eating healthy food.
B) Don't obsess about treats. When they're at parties, all bets are off, let them eat cake and punch and go into comas. Throw out MOST of the holiday candy that accumulates, but keep some for rare treats. You don't want "forbidden fruit" syndrome. Mom and dad have the rare cocktail, the rare dessert, the rare day off in front of movies in their sweats, let the kids have the rare junk food.
C) Keep the grandparents at a distance if they ALWAYS feed her junk, but sometimes, there is nothing you can do.
After a week with my in laws, the kids have eaten enough preservatives to constipate them for weeks, and have had enough sugar melt downs for me to have to sit through hundreds of descriptions of their alien behavior and how puzzled everyone is about it. They get circles under their eyes and often throw up and spend some nights up late crying with belly aches while everyone "puzzles over it" after a dinner that even my adult body couldn't process. And they are all too happy to get back to our NORMAL eating when the grandparents scram. Thank goodness it only happens a few times per year, and I get to explain what they ate and why they feel that way, so it's a learning thing.
Get your daughter more active. My 5 year old has been joining me doing my workout DVDs. She's thin and I didn't ask her to, she just thinks it's fun since she always sees me doing them, she wants to do it too. AND she's running around all day and playing outside etc. Keep good food in the house, and stick with it. Don't expect your daughter to naturally want to eat right on her own at this age just because you "told her she should". No kids think that way. She's surrounded by bad food and obese people. Soda should never be in the house. Don't blame her or think she is strange in her behavior, just be sure you are doing everything in your power. Don't worry about occasional birthday parties.
As for her sneaking food and eating until she throws up, this could be depression forming. She likes the food because you formed that habit for her, but she is excessive because she is stressed and seeking comfort. Sounds like the whole living environment needs analyzing, not just her.