surely his/her obligation to you as their friend outweighs their obligation to a confidence given probably without knowing the nature of the information beforehand.
It wouldn't be a stretch to assume the guy in question is friends with both parties though, I doubt many people would tell others things in strict confidence that they didn't consider at least on the level of a 'work friend'.
In reality, this guy has probably had to weigh up the value he places on two different friendships and it probably wasn't as easy a decision for him as you seem to imply.
If there is no such friendship with the 'gossiper', the next most obvious cause is as the poster above suggests, a deliberate attempt to see if this guy would pass along the knowledge. In which case you'd want to think hard about whether you really want to bring it up and how likely that possibility is.