Onel Hernandez broke the deadlock on his home debut after signing on loan from Norwich with a low strike into the bottom corner in the first half.
Scott Hogan's second goal in three games doubled Blues' lead and secured their first win since the end of November and their first of 2022, putting some breathing room between themselves and the Championship relegation zone.
Former Sheffield United man Hogan, who rescued a point at Preston last weekend, was the matchwinner when he was in the right place at the right time to stab the ball home and earn three valuable points for Birmingham.
Victor Adeboyejo pulled a goal back for the Tykes with his third goal of the season with a low drive into the back of the net after the ball fell to the striker in a busy penalty area with three minutes remaining, but they could not rescue a point.
The rock-bottom Reds are eight points adrift of fourth-bottom Reading. But Asbaghi urged his players to believe they can avoid the drop after seeing improvements in their performances.
"We have to keep believing and keep doing what we're doing out on the pitch," he said.
"In one way, if we had lost this game without having nothing to say then you have to rethink and ask what we're doing.
"Losing this way is a bigger disappointment because we felt like we could turn this game round. But for the future process, it gives us more confidence that we came here and create that number of chances."
"You can lose in different ways,” the Reds boss added.
"You can come here and have nothing to say or you can lose like we did today. Today was a game in which our overall performance was pretty good.
"We created a lot of chances today and more chances than we have done in other games combined.
"Birmingham created chances, especially in the first half, but overall I think we created more than them. But it's the result that counts and, of course, Birmingham take the points."