I only work with one person right now, but when I worked in a larger office setting, I tried very hard to get along with everyone. I never got involved or joined in the office gossip. I might be standing with a group of women, and I never told them how wrong they were to be gossiping, I just did not join in.
Talking about someone else behind their back will backfire on a person every time. I also made a point not to correct people when it wasn't my place to do so.