The win makes it a very happy Easter for Martinez and his side after their 2-1 victory over Norwich on Saturday. And their quest for a top-six finish was helped by Burnley's defeat to Cardiff.
Martinez said: "The result puts us in a good position. It is a very difficult place to come so I am delighted with the result.
"Overall the six points over the last two games is a big boost. It is very important against two sides, Norwich and Barnsley, who are fighting for their lives.
"The reality is that unless we get 74 points we won't get in the top six. We need to get nine points. If we do that we will get into the play-offs.
"What you want to do is get in there with a good run of form and we will do that if we get there because we will be off the back of five straight wins."
It was all too easy for the Swans who hardly broke a sweat in the first 45 minutes and found themselves comfortably in the lead thanks to Williams' second-minute header and a low shot from Gomez in the 35th minute.
The hosts did improve after the break and they had chances through Jon Macken and Adam Hammill, but Jason Scotland put the game to bed with 23 minutes remaining, tapping in after a mix-up between Stephen Foster and Heinz Muller.
The Reds did pull a goal back through Daniel Bogdanovic, who converted an 84th-minute penalty after Leon Britton handled in the area, but it was too little too late.
The result keeps Barnsley in deep trouble at the foot of the table and extends their winless run to five matches.
Assistant manager Ryan Kidd admitted morale is low at Oakwell and believes the Tykes will have to win at least two of their remaining four games to stay up.
He said: "It is hugely disappointing and very demoralising. Losing 3-1 on your home patch at any point in the season is not great and we needed a win today.
"The first 10 minutes were massively important. It was important for us to get off to a good start, which we didn't do.
"I thought we played some decent stuff in the first half and we had far more possession just no end product.
"The decision-making is poor and you can see we are low on confidence."
The Reds travel to Reading on Saturday and Kidd knows his side must put this result out of their minds if they are to get anything from the Madejski Stadium.
"Reading is a game we have to get something from, we need to put this to the back of our minds," he added.
"We probably have to win at least two of our remaining games to survive."