Danny Batth turned home Sam Clucas' cross in the 12th minute to give the Potters the early lead before Clucas himself doubled the hosts lead in the final minute of the first half.
The victory moves Stoke to 49 points, the same as Birmingham with the Potters above the Blues on goal difference with both sides four points clear of relegation.
Story of the game
Stoke were off and running early on as Scott Hogan had a free kick inside of two minutes, but his shot was well wide. Nick Powell picked out Sam Vokes, who headed off the crossbar before firing the rebound wide. Birmingham goalkeeper Lee Camp then saved Powell's curler. Tyrese Campbell then dragged his effort past the Birmingham goal in the 11th minute.
A minute later, the hosts were in front. Powell crossed for Batth, who beat Camp from four yards out. The Blues keeper was alert to the danger, saving from James McClean. Campbell was next to try his luck from the resulting corner, but his shot was blocked.
Birmingham recorded their first chance just after the half hour mark as Lukas Jutkiewicz headed for Gary Gardner, whose effort was saved by Stoke keeper Adam Davies. The Blues were saved by the crossbar as McClean's drive hit the iron.
With time winding down in the first half, the Potters doubled their lead as McClean and Powell combined for some neat buildup play and the result was Clucas perfectly placing into the top right corner.
Birmingham almost afforded an immediate response when Jade Bellingham saw his shot blocked while Wes Harding blazed over to close out a half that was dominated by Michael O'Neill's side.
The second half saw the introduction of Blues substitute Jeremie Bela spark the visitors to life as his low drive was stopped by Davies and seeing his long-range strike deflected past the Stoke goal on 66 minutes.
Clucas nearly turned provider for Jordan Cousins whose shot from the resulting cross was held by Camp. In the final minute of normal time, Jaolan Boyd-Munce's inviting cross found the head or Gardner, who flashed his shot wide, summing up the afternoon for the visitors while the hosts celebrated a much-needed win.
Man of the match: Sam Clucas
His goal provided some insurance for Stoke while he was also involved in many of the other chances the Potters had, often linking up with Powell in the buildup play as well creating with some excellent crosses.
Stokes best players came through when they needed it the most
While Clucas was scoring as well as creating and providing, Powell and Vokes were also involved, especially early on when the Potters set the early pace of the match and they kept up the pressure throughout as their key men did the job.
Birmingham lacked the spark needed against a desperate team
With Stoke needing every win they can get, Pep Clotet knew his side were up against it and they afforded little in the way of attacking play until Bela came on. The few chances Birmingham had were nowhere near on target and when they finally strung together a couple of late chances, it was far too late.