The 20-year-old Majchrzak, ranked 277th in the world, pulled off a shock 6-2, 4-6, 6-2, 6-3 win over the experienced Mayer, 32, who is ranked 218 places higher, to give Poland everything to play for in Sunday's fifth and final rubber.
The play-off, on clay at Berlin's Rot-Weiss Stadion, will now be decided by Jan-Lennard Struff's tie against Poland's Hubert Hurkacz.
Germany had been cruising to victory at 2-0 up after Struff and Mayer won their singles rubbers on Friday.
But Marcin Matkowski and Lukasz Kubot battled back superbly from losing the first two sets to claim a 6-7 (5/7), 4-6, 6-3, 6-4, 6-2 victory over Daniel Brands and Daniel Masur on Saturday in rain-hit Berlin, before Majchrzak's victory levelled the scores.