Put one’s foot in one’s mouth

To say something that is the wrong thing to say in a situation.

I put my foot in my mouth and said that I did not like fish just before my friend served me fish for dinner.