A very tight contest looked set to end in stalemate when the big striker struck five minutes from time to keep Ferguson's men hot on the heels of leaders Leyton Orient.
Substitute Danny Kearns played the vital pass and Barnett found a yard of space to crack an unstoppable 10-yard shot inside Vale goalkeeper Chris Neal's right-hand post.
Ferguson said: "It was a bit of magic from the big man. It took a moment of individual brilliance to win what was a really tough match.
"Tyrone has been on fire this season and it was a great goal. It was probably the one piece of true quality in the game.
"If I'm honest we never really got going. We haven't played well, but good teams can win games without being at their best.
"I felt we played into Vale's hands. We didn't move the ball quickly enough, particularly in the first-half.
"We upped it a bit in the second-half, but I would imagine Port Vale would feel they were unfortunate to lose the game because they put a lot into it.
"Of course results are the most important thing, but performances come very close behind as far as I'm concerned and we can play better than that."