Bayern Munich scored twice in stoppage time to secure a come-from-behind win against a dogged St. Pauli side on Matchday 12.