back the wrong horse

If you back or bet on the wrong horse, for example the loser in a contest, match or election, you support the wrong person.
“When I voted for him I was convinced he would win, but I backed the wrong horse!”

bark up the wrong tree

A person who is barking up the wrong tree is doing the wrong thing, because their beliefs or ideas are incorrect or mistaken.
“The police are barking up the wrong tree if they think Joey stole the car – he can’t drive!”

botch up/make a botch of (something)

If you spoil something, or make a mess of it, by doing a job badly or incorrectly, you make a botch of it or you botch it up.
“Danny tried to assemble the new desk, but he made a botch of it.”

eat crow / eat humble pie

If you eat crow or eat humble pie, you are forced to acknowledge that you were wrong about something and make an apology.
“He had no option but to eat crow and admit that his analysis was wrong.”

eat one’s words

If you eat your words, you have to admit that you were mistaken in what you said.
“After predicting disastrous results, he had to eat his words when he saw the success of the new product.”

Freudian slip

A Freudian slip is a mistake made by a speaker which is considered to reveal their true thoughts or feelings.
“So you got the job – I’m so sad …  Sorry, I mean ‘glad’!”

Himalayan blunder

If you stupidly make a serious mistake or error, you commit a Himalayan blunder.
“Apparently he lost his job because of a Himalayan blunder.”

overshoot the mark

If you go too far or go beyond what was intended, by misjudging something (situation, distance, amount, etc.), you overshoot the mark.
“He tried not to spend too much but he overshot the mark by about 20%.”

see the error of your ways

When someone sees the error of their ways, they understand that what they are doing is wrong and accept to change their behaviour.
“He talked to a counsellor who tried to make him see the error of his ways.”

swallow your pride

If you swallow your pride, you accept something humiliating or embarrassing, for example having to admit that you are wrong, or that you have less knowledge that you thought.
“When Jill failed the exam, she had to swallow her pride and repeat the course.”

swallow your words

If you swallow your words, you admit that you were wrong.
“He said I’d never get the job, but he had to swallow his words when I was appointed.”

trial and error

Attempting to achieve a satisfactory result by testing and eliminating various methods until the best one is found is called trial and error.
“Some of the best cooks learn by trial and error.”

wide of the mark

If something is (or falls) wide of the mark, it is incorrect or inadequate, or it is not what was expected.
“The price offered was wide of the mark; it was sold for ten times more!”