The Ladbrokes Championship outfit, who knocked out Ross County in the previous round, had hoped to take another Premiership scalp when they edged ahead after four minutes against St Johnstone through Aaron Drinan.
However, the January loan signing's strike was cancelled out by a Muirhead own goal in the 18th minute and the defender was then booked and later shown a straight red card by referee Steven McLean for a lunge on Liam Craig.
Saints then edged ahead moment later through Callum Hendry and would hold out for a 2-1 win to progress to the quarter-finals.
Kerr admitted afterwards Muirhead's dismissal was the decisive moment of the game, saying: "The sending off has really set the game up to be in St Johnstone's favour because they can then counter-attack – and they are really good at that in the Premiership.
"Losing the second goal so quickly after the sending off, we've not even had a chance to grind it out with 10 men.
"I thought his first challenge was all right, I didn't think it was a yellow card but maybe it was.
"But the second one, it's so close to the first yellow that it's stupid. You've got to just hold back a wee bit and I think Aaron knows that.
"We all go in to those challenges and when it's at the start of the game and you're trying to set the tone, then you are maybe getting away with a yellow card.
"But I think just because he had come off a booking and he takes a heavy touch, that sets it up for the referee – and I can't say anything about the referee on that one."
St Johnstone manager Tommy Wright hailed his side's display in horrendous weather conditions as Storm Ciara rolled in and was delighted to reach the last eight.
Wright said: "We emphasised to them that you want to come off that pitch, preferably with a win, in the hat for the next round.
"They did that, both sides deserve a lot of credit, the conditions were horrendous.
"I think Ayr will feel a bit unlucky as they started the game really well.
"Once it settled, we got the equaliser and were in control and then the sending off happened. For us to score straight after that was a big blow for them."