In the 17th minute, Ellis Iandolo put Swindon ahead after catching Craig Ross off his line and scoring a free-kick from all of 35-yards-out.
The lead didn’t last long though as Barnet pulled a goal back almost straight away, John Akinde heading in from Jamal Campbell-Ryce’s cross to level in the 20th minute.
The first half was an end-to-end affair, and Swindon nearly hit straight back but Ross got down low to deny Luke Norris.
In the final action of the half, Matt Preston’s sliding volley six yards from goal restored the lead for the visitors.
In contrast to the first half, the second had chances few and far between, Jack Taylor’s effort was stopped low by Reice Charles-Cook.
Barnet came closest to equalising when Akinde set up Mauro Vilhete, whose effort was deflected twice before looping just over the crossbar.
Attendance – 2,035 (629 Swindon fans)
Barnet FC: Ross, Brindley, Santos, Nelson, Akinde, Campbell-Ryce, Coulthirst, J. Taylor, Fonguck (Akinola 86′), Vilhete, Blackman (Tutonda 23′).
Unused: R. McKenzie-Lyle, Clough, Watson, Nicholls, Sweeney.