To eat humble pie

ᴛᴏ ᴇᴀᴛ ʜᴜᴍʙʟᴇ ᴘɪᴇ means to be prepared to suffer humiliation by admitting that one is wrong, whether one believes this to be so or not, and to apologise for what one has done or said.

The expression probably arose from medieval dining customs. The choicest meat was served to the master of the household, his family and guests and the less desirable were given to the staff, baked in the form of pies