Toney was largely kept quiet throughout the 90 minutes but his effort midway through the second half – his 11th in as many league outings – proved decisive.
The victory was Brentford's first in four outings and moved them within two points of the play-off places.
It was a fair result as the visitors created most of the openings, keeping Barnsley at bay.
Rico Henry then went close for the visitors with a low shot which went narrowly wide of the goal.
ryan Mbeumo went close with a long-range effort which only just cleared the crossbar and Pontus Jansson directed his header on target following a corner, but it was straight at Walton who gathered comfortably.
The goal finally came in the 66th minute. Mathias Jensen delivered a corner and former Newcastle striker Toney met it with a glancing header that found the net.
Marcondes set up Mbeumo who shot wide from the right-hand side of the area as the visitors threatened a second.
But Brentford still poured forward and Walton had to catch a deep cross from Henrik Dalsgaard as Fosu waited to pounce before Bees substitute Sergi Canos just failed to get on the end of a long ball forward.
The Barnsley players and management made a strong appeal for a penalty when Vitaly Janelt appeared to handle the ball inside the area, but referee Darren Bond was unmoved.
Canos put fellow substitute Marcus Forss through on goal in stoppage time but Walton was alert to the danger and made a vital save to deny him.
Barnsley, who started the game on a run of four league wins out of five under Ismael, never seriously threatened to draw level.