Craig Alcock gave Yeovil an early lead after eight minutes when he sneaked in to smash home from Danny Schofield's corner.
Lee Peltier's close-range strike then doubled their lead before the half-hour as Schofield again caused havoc in the Swindon defence.
Michael Timlin's fabulous 20-yard free-kick halved the deficit on the stroke of half-time after Terrell Forbes had hacked down Lee Peacock.
John-Paul McGovern gave the home side hope of snatching the win when he levelled proceedings after 47 minutes with a simple goal as the visitors' defenders collided.
However, their hopes of taking anything were dashed when Yeovil regained the lead in the 72nd minute. The home defence inexplicably allowed the ball to bounce in the penalty area and the final touch appeared to come off the the unfortunate Ifil's head in the six-yard box.