Argh! Playground politics! Sorry to hear this happened to your daughter.
I'll never forget when my son was 3 and wanted to play at the playground. It was a gray, chilly day and the only other kids there were two 6-year old boys on a playdate together. My son kept trying to tag along, no matter how hard I tried to redirect him. The two older kids started by calling him "baby" repeatedly and yelling at him not to follow them. THEN they called him up to the slide, blocked his way and started pushing and punching him. Meanwhile, the two dads were sitting on a nearby bench, chatting away obliviously. At that point I had to take my son out of the playground because I think he would have STILL tried to play with them, that's how socially clueless he was at that age. I told him and the two boys that we were leaving because they were not nice boys and played really mean. I doubt it made any impact on the boys, but it definitely did on my son.
Afterwards, we had a discussion in the car about how those boys played so mean, how my son shouldn't keep following or playing with kids when they said "no" or acted that way and how, if I EVER caught him acting that way towards another kid - particularly a younger one - he would be in HUGE trouble. Now, two years later, he is generally good about playing with kids of all ages and I've rarely seen mean behavior. If I do, I pull him up short - fast!
Now that he's older, if another kids acts mean towards him, I tell him he can either tell the other kid to "stop it" or stop playing with the kid and find someone else to play with. His choice. He's old enough now to deal with the consequences. I only ever intervene when I witness physical violence or if the other kid makes it clear he doesn't want to play.
It really bugs me when other parents don't correct their kids in these situations - like the two chatting dads on the bench or the mom who told your daughter to stop following the other kids. If I were in her shoes, I would have told my kid to play nice and include her. What a lost teaching opportunity. That said, I'm not the type to go up to another parent and tell them their kid is behaving poorly - very few parents like to hear from another that their child isn't being nice.