The Beatles, the Rolling Stones and the Who are without doubt the Holy Trinity of the 1960's. So I think that the Stones and the Who fight for the place of 2nd greatest band ever.
In my opinion, the Stones were great from 1965 to 1972, and the Who released very solid records from their beginning in 1965 to the death of Keith Moon in 1978. In favor of the Stones, I must say that they released the same quantity of albums in the 1965-1972 period as the Who in 1965-1978, so Mick & friends were more productive. The Stones were also much more popular than the Who, if that counts. However, the Who had better musicians, delivering much more virtuosism. Moreover, Jagger-Richards and Townshend were all great songwriters, but Pete's lyrics were much better and more interesting in my opinion. Also, while the Stones were imitating the Beatles in 1966-1967, the Who presented a new original sound, with revolutionary songs like "My Generation", the mini-rock opera "A Quick One, While He's Away" and their own vision on psychedelia as in "I Can See For Miles". Meanwhile, the Stones best albums appeared in 1968-1972, and though they were first-rate blues-rock records, they weren't very innovative; at the same time the Who broke new ground with albums like Tommy (1969) and Who's Next (1971).
For all these factors, apart from personal taste, I vote the Who as the 2nd greatest band ever.