St. Pauli staged a stunning late fightback from 3-1 down to draw with Borussia Dortmund, who had Filippo Mané sent off.