Here we study the emergence of spontaneous leadership in large populations. In standard models of opinion dynamics, herding behavior is only obeyed at the local scale due to the interaction of single agents with their neighbors; while at the global scale, such models are governed by purely diffusive processes. Surprisingly, in this paper we show that the combination of a strong separation of time scales within the population and a hierarchical organization of the influences of some agents on the others induces a phase transition between a purely diffusive phase, as in the standard case, and a herding phase where a fraction of the agents self-organize and lead the global opinion of the whole population.