In the 18th & 19th centuries( and to a lesser extent later) dinner guests were expected to converse and be sociable with their neighbours at table and if you were known to have a fund of amusing or interesting anecdotes then you would be more likely to get invited to lots of dinners hence the expression.