Veteran striker Tommy Johnson came off the bench to score his first goal for the club, with his 117th minute strike sealing a 1-0 win after Bury had forced the tie into extra-time.
United will now travel to face Conference side Aldershot in the second round of the competition next month.
Laws said: "I'm pleased with the result, it does not matter how you get through, no one gets an easy ride and I did not expect one.
"We gave a very professional and athletic display but that's what the players are paid for.
"We kept a clean sheet, had some scrappy half chances but looked the better side and now we look forward to visiting Aldershot."
Bury manager Chris Casper said: "I'm disappointed at the way we went out, we handled everything they threw at us all night.
"We just did not take our chances in what was a proper good Cup tie, but some of the decisions did not go our way.
"We showed a lot of character and determination and if we continue to play like this we should do well."