Mensik struggled with double faults in the second set as Bergs won 6-2, 7-6(4), before former world number one Mertens beat Krejcikova 5-7, 6-1, 7-5 to seal the tie.
Bergs, ranked 42nd in the world, landed four aces as he took the first set in 31 minutes, and kept his cool through a tense second-set tiebreak to clinch his second straight win over a top-20-ranked opponent, having beaten Canadian world number five Felix Auger-Aliassime in the group stage.
"You’re so close, you’re playing big points. I got tight, I go backwards, I play defensive. So it was a very big struggle in the end. I'm so happy for myself and the team," Bergs said.
Mertens wore down two-time Grand Slam winner Krejcikova, who committed seven double faults in the third set.
"I felt like I had to play a little aggressive... I'm really happy I could turn it around. It was 1-0 for Belgium, so I could play freely, thanks to Zizou," Mertens said.
Australia face Poland on Friday for a place in Saturday's first semi-final against the United States.
