To turn the tables...

Where does this phrase come from ?

Whenever I try and search for its origin, all I get is a whole lot of garbage about turntables !

Please enlighten me, somebody.

Forgive me if I’m mistaken, but I do believe that the phrase, “To turn the table” originated at dinner parties many years ago. Guests would follow the hostess’s lead and talk to their companion to the left, and then to the right, of where they were seated.

I do not have a cite.

http://www.rootsweb.com/~genepool/sayings.htm

But to “turn the tables” basically means to gain the upper hand after having the lower hand.

What does this have to with turning our plates over to the “good side” when we have guests over?