Warnock, 74, had been in charge for an English league club record 1,603 matches spanning 16 teams when he appeared to call time on a 43-year career in management in April 2022 after leaving Middlesbrough by mutual consent.
But the lure of trying to help Huddersfield, one of his former clubs, in their fight to beat the drop into the third tier, proved too strong to resist.
The new manager's impact was evident as Joseph Hungbo and Jaheim Headley scored their first goals for the Terriers either side of half-time as Huddersfield came from behind after Troy Deeney had given Birmingham an early lead.
Huddersfield's victory ended an eight-match winless run in all competitions, and took them up one place in the table to 22nd - two points from safety.
"I think it's good for the club (me coming in as manger) at the minute because they haven't got to rush into appointing anybody," said Warnock.
"We've got an outside chance of staying up when you look at the tough fixtures, but we'll give it a go and I said to the lads 'whatever happens, I want to enjoy myself'," he added after making seven changes to the team that started in a 3-0 midweek defeat by Stoke.
"And the fans, to stay behind like they did after that, that was a bit emotional walking around the pitch at the end."