Schalke dealt a serious blow to their local rivals' title aspirations in a pulsating, come-from-behind win in the Revierderby.