Borussia Dortmund were victims of an improbable comeback as Werder Bremen scored three late, late goals.