Because my profession is dominated by women, this has always been a big office issue. Over my career, I've definitely learned the hard way a time or two and now, it's something I stay away from. I'm fortunate, too, to have landed in a work place with a lot of good people and a really strong team, although the flip side of that is that a lot of them socialize together and that's something I usually don't do. I've taken a bit of slack over that but prefer to keep work separate from social life (outside of the annual Christmas party type of thing). The workplace gossip is always flying rampant after a weekend party!
Have a great day!