I think many of us can say something right at the right time. But there’s a deeper skill:

“Remember not only to say the right thing in the right place, but far more difficult still, to leave unsaid the wrong thing at the tempting moment.” - Benjamin Franklin