Barnsley boss Danny Wilson made two changes to his side which beat Oldham Athletic 1-0 on Tuesday night.
Midfielder Conor Hourihane was rested for the first time this season having played every minute of every game this term.
The Irishman dropped to the substitute’s bench – and was joined by striker Kane Hemmings, who also missed out despite having bagged the winner against the Latics five days ago.
That gave youngster Paul Digby the chance to shine in the midfield, while George Smith was expected to play wide on the left.
The Robins started the brighter of the two sides and Nathan Byrne fired a right-foot shot wide of the target with the first chance of the contest.
Reds midfielder Paul Digby had a right-foot shot charged down on the edge of the box by Jack Stephens.
The hosts took a 14th-minute lead when John Swift danced his way past Digby and George Smith, saw his cross deflected out to near the penalty spot and fired home into the bottom right corner by Raphael Rossi-Branco.
Digby conceded a poor penalty when he needlessly felled John Swift in the box. Williams took the spot-kick, but Turnbull produced a fine save to deny him, diving outstretched to his right.
The Robins nearly doubled their advantage just before the break, but Turnbull saved well from Byrne and then Jordan Turnbull somehow headed wide with the goal at his mercy from Harry Toffolo’s cross.
Half-time: Swindon 1 Barnsley 0
Reds’ boss Danny Wilson made two substitutions at the start of the second half. The injured Martin Cranie was replaced by Conor Hourihane, while the ineffective Digby was replaced by Dale Jennings.
Manchester United loanee Ben Pearson, playing his last loan game for the club, miscued his right-foot shot from a good position.
Jack Stephens picked out Williams with a brilliant pass, but the striker saw his shot well saved by the on-song Turnbull.
Wilson used his third and final substitution as the Reds looked to get an equaliser in what was a one-sided affair, with the Robins much the better side. Chelsea loan striker Alex Kiwomya was introduced in place of Lalkovic.
Williams came off for the Robins and was replaced by Michael Smith as the hosts made their first change of the afternoon.
Some poor defending from the Reds cost them as an unmarked Ben Gladwin netted the second after 85 minutes with a shot which creeped under the body of Turnbull. The keeper, who had been impressive, should have done better.
Massimo Luongo turned inside and saw his dipping left-foot shot fly narrowly over the crossbar and then, in the same minute, substitute Gladwin forced Turnbull into a smart stop.
Josh Scowen fired well wide from distance for Barnsley but the damage had already been done.
Swindon: Foderingham (c), Branco, Stephens, Turnbull, Byrne, Luongo, Kasim, L. Thompson, Toffolo, Swift, Williams. Subs: Belford, Barthram, Rodgers, Gladwin, Hylton, Obika, Smith.
Barnsley: Turnbull, Nyatanga, Cranie, M’voto, Ramage, Smith, Lalkovic, Scowen, Digby, Pearson, Waring. Subs: Hourihane, Winnall, Hemmings, Jennings, Davies, Bailey, Kiwomya.
Referee: Gary Sutton (Lincolnshire).