Is there a word describing the phenomenon of when you insult or speak badly of something but it turns out the person you are speaking to likes or owns or is related to that thing? E.G. you say "The new model of XYZ looks terrible" and the person you are speaking to says "Oh... I've just gotten one."
I was talking to the boss about the new XYZ and I really put my foot in it, I didn't know he'd just bought one of the hideous things!
A good phrase would be faux pas
a slip or blunder in etiquette, manners, or conduct; an embarrassing social blunder or indiscretion.
While it's not as highly specific as your scenario I believe it would still fall under a faux pas.
I don't think English has a word for the precise situation you are after, but have you considered gaffe:
an unintentional act or remark causing embarrassment to its originator; a blunder.
synonyms: blunder, mistake, error, slip, faux pas, indiscretion, impropriety, miscalculation, gaucherie, solecis, slip-up, howler, boo-boo, fluff, flub, blooper, goof
"I made some real gaffes at work"
Well he certainly turned the tables on you. This expression can be used to summarize the fact that he used your negativity against you.