Schalke scored twice in the closing stages to complete a come-from-behind victory over the Bundesliga 2 leaders.