Williams, born in Perth, came off the bench in the 90th minute with the scores locked at 3-3 and in just three minutes managed to grab an unlikely winner for Barnsley.
The brother of Perth Glory defender Rhys Williams showed great timing as he arrived in the box at the perfect moment to tap home Marley Watkins' cut-back.
The 23-year-old is yet to start for the Championship side, coming off the bench five times, but his first goal in such an important moment is likely to lead to increased opportunities.
“It’s probably a whole year piled into one minute there! It was good for me, obviously a lot of relief and a lot of relief for the boys who worked so hard for that one," Williams told the club website.
"For me to come on and finish it off for us was amazing. They (the players) are the ones that worked hard and I came on and tapped the ball in, so the credit goes to me but everyone has done so well. We’re just happy to get the three points.”
“There’s been a lot of times where I’ve been sat back in the stands watching the game, and now it’s nice to be on and to be the one to score the winner is obviously fantastic.”
Williams joined Barnsley initially on loan in 2014 when the were in League One, England's third tier, and then signed for them permanently in 2015. Prior to that he spent time at Oxford United, Fulham and Portsmouth.
Elsewhere, Australia's Tom Rogic went off injured after being on the end of a bad challenge in the 46th minute as Celtic defeated Dundee 2-1 in the Scottish Premiership. The club is yet to confirm the seriousness of the injury.
Meanwhile, former Perth Glory midfielder Ryan Edwards set up the equaliser in Partick Thistle's 1-1 draw with Hearts.
Jackson Irvine picked up a yellow card for Burton Albion in their 2-1 loss to Newcastle United, while Bailey Wright couldn't get off the bench as Preston North End defeated Bristol City 2-1.
Jimmy Jeggo played 90 minutes in Sturm Graz's 3-0 win over Ried, Brad Jones started in goals as Feyenoord beat Vitesse 3-1 and Scott McDonald played 90 minutes in Motherwell's 1-1 draw with St. Johnstone.