The pacey wing-back ran more than half the length of the pitch before firing home in the 79th minute after goals from Troy Deeney, Davide Faraoni, Fernando Forestieri and Sean Murray put Gianfranco Zola's men on course for a fourth league success of the campaign.
Jason Scotland's 13th-minute strike cancelled out Deeney's opener to briefly put the home side level.
In the opening exchanges Hornets defender Marco Cassetti flashed a header wide from a Lewis McGugan corner before the away side took a seventh-minute lead.
Midfielder McGugan's through ball split the Barnsley backline and, with defenders appealing in vain for an offside flag, Deeney kept his composure to emphatically dispatch his sixth goal of the season past Tykes goalkeeper Luke Steele.
The lead did not last long and striker Scotland, making his first start of the season, showed dogged determination to win possession in the Watford penalty area before striking a low shot which flew across Manuel Almunia and nestled in the back of the net via the left-hand upright.
Watford's free-flowing, attacking football was causing the hosts plenty of problems and the Hornets restored their advantage four minutes later, with former Nottingham Forest man McGugan again the creator.
The midfielder's deflected cross from the right looped up to the back post for wing-back Faraoni to plant a side-foot volley past Steele.
Italian defender Cassetti continued to threaten at set pieces and his 32nd-minute header from another McGugan corner was repelled by Steele as Watford looked to edge further ahead before the interval.
And, two minutes before the break, a third goal side duly arrived.
Anya tricked his way to the left byline past Scott Wiseman before pulling the ball back for Forestieri to fire into the roof of the net.
Barnsley began the second period brightly and Kelvin Etuhu found space inside the Watford 18-yard box for a strike on goal but the midfielder's effort was tame and collected at the second attempt by former Arsenal keeper Almunia.
Tykes striker Chris O'Grady went close just after the hour mark with a deflected shot from the edge of the box which whistled narrowly wide before Almunia produced a magnificent save to deny Martin Cranie's close-range header moments later.
But, in spite of the home side's efforts, the result was put beyond doubt with 21 minutes remaining.
Teenage Irish midfielder Murray picked up the ball 25 yards from goal to hit a powerful left-footed drive into the bottom left-hand corner.
And Anya rounded off a perfect afternoon for the Hertfordshire side when his long run was followed by a low strike past Steele.