Gabriel Otegbayo tapped home early for the Bees before Wednesday drew level after the break through Djeidi Gassama.
The match ended 1-1 and went to penalties, with the first nine being converted.
The Bees goalkeeper Mark Flekken saved Liam Palmer's effort to seal the victory for the Premier League club.
Flekken, who admitted he was at fault for the equaliser, later said, "At the moment I caught the corner kick I had so many possibilities but I took the wrong one.
"The mistake I made helped a lot to bring our mental side down. It took away the control we had. It went from a controlled game to an open game. I need to learn from that.
"I went to the wrong side twice at the start (of the shootout). That doesn't help your confidence in a shootout but luckily I saved the last one.
"It's not the first and only mistake I’ve made in my career. I’m 31 now with quite some experience, that helps a lot (to come back from) a mistake like that."