David Ngog and Jay Spearing had given Wanderers a 2-0 half-time lead but they allowed the Tykes back into the contest after the restart.
Tomasz Cywka and Chris O'Grady got the hosts back on level terms but the Trotters produced a positive response and Craig Dawson netted a 59th-minute winner.
Freedman said: "I felt the first half we went into a deserved lead, played some fantastic football, created more than a few opportunities and had a deserved 2-0 lead.
"But credit Barnsley; they came out, they changed their shape, we didn't react quick enough, they got a couple of goals back and it was credit to Barnsley that they did that.
"But I just felt that gave us a little bit more determination to go and get another goal at the other end, and we did that.
"Towards the end we dug in there, we hung in and defended very well. If you're going to maintain any sort of interest in this season then you've got to defend well. I felt towards the end we coped very well.
"Maybe this team of old might've panicked (after surrendering a two-goal lead) but I'm certainly seeing the improvement in our defending and towards the end we weren't really troubled at all.
"We've got a spirit among us right now - it's been very difficult for the players - but they're growing in confidence with these wins and we're certainly going in the right direction."