The 34-year-old trailed 1-0 and 2-1 and despite going in level at 2-2 at the mid-session interval after two 50-plus breaks, he was not happy.
"There was lot riding on it and it took me a little longer than I anticipated to settle down.
"Even though I made a good break to go 1-1, I just never felt I had completely settled," said the world number 24.
The Londoner produced a magnificent 131 in the fifth frame and added two more to make it four in a row and leave him needing just one for victory at the York Barbican.
Northern Ireland's Swail, the world number 58, pulled one back, but Gould's fourth half-century of the match secured a quarter-final meeting with David Grace.
Gould, who had never previously been beyond the second round of the UK Championship, added: "I was pleased to come out at 2-2 after the interval. And I said to myself it was the time to step up.
"The 131 was the first frame after the interval and that gave me the impetus to carry on.
"I got in to a rhythm and a stride and when I get I am quite hard to stop. It was important for me to stamp my authority on the match."
Leeds potter Grace, who is ranked 81 in the world, beat former world champion Peter Ebdon in the fourth round.
Martin Gould said he felt the pressure in the early stages of his 6-3 last-16 UK Championship win over Joe Swail.