Super-sub Jon Parkin, also known as The Beast, scored his second winning goal in five days to take Preston back into the top six.
Preston had the first chances after three minutes when crosses by left-winger Ross Wallace and right-back Eddie Nolan were both saved by Birmingham City keeper Maik Taylor.
In the eighth minute Lee Carsley had a low drive which was saved one-handed by Andy Lonergan with the ball heading for the bottom left-hand corner of the net.
After a quarter-of-an-hour a cross by Quincy Owusu-Abeyie led to an effort by centre-back Radhi Jaidi being saved before Preston left-back Callum Davidson saw his shot saved.
Stephen Elliott had a shot turned away for a corner and Owusu-Abeysie crossed for Kevin Phillips to have an effort saved.
Owusu-Abeysie then saw his cross saved before Taylor kept Preston captain Paul McKenna's 20-yard left-foot shot out.
Five minutes before the interval Wallace on the right wing had a left-foot shot palmed around the post.
In the 62nd minute, David Murphy crossed the ball to Phillips and he had an effort saved.
Wallace then had another cross saved before Nigel Quashie went close with a long-range effort.
The game appeared to be heading for a goalless draw when, in stoppage time, Wallace put over an inch-perfect left-wing cross that found Parkin.
The big striker, who had replaced Chris Brown with 12 minutes to go, chested the ball down inside the six-yard box before flicking it into the bottom left-hand corner of the net to send the Deepdale fans into raptures.