The Glovers were undoubtedly helped by a calamitous mistake by Birmingham's stand-in central defender Hayden Mullins.
Randolph was then beaten for a second time when Hayter glanced home a header from a left-wing cross by Joe Ralls.
Hayter's two-goal blast was a wake-call for Birmingham and Lee Novak hit the crossbar with a header and teenager Reece Brown hammered in a blistering shot which was well saved by Marek Stech as the hosts tried to respond.
McDermott admitted afterwards: "To say we are disappointed is an understatement.
"We actually played quite well in the first half when we created a lot of chances.
"The second half became more difficult. When you park 10 men behind the ball it is difficult to break.
"We should have dealt with the two goals and we paid the penalty."
McDermott did, however, paid rich credit to youngster Brown on his league debut.
"He was fantastic. He has a big future ahead of him," he said.
"He is a laid-back character and you cannot faze him. This is a great asset to have in the game.
"For someone so young he has an awareness which is a great gift to have as a footballer."
- Sports & Recreation
- Hayden Mullins
- Darren Randolph
- Reece Brown