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.
There is no cultural code or conduct to impose on preference. Difference in preference is not a faux pas. We'd have hardly anything to talk about, excluding preference.
Further, culture does not impose learning innumerable details about interlocutors (if to have difference for a faux pas). Humorously, your thing is a petitio principii.
Should you have the purpose of making someone believe you adore them (which may be a risky endeavor, whatever the interesting part in talking as to a mirror), your thing would be an indecorum or indelicacy. :)