Like Tommasini, you never define "greatness" or "great," so people are free to submit their favorites as their idea of the "greatest." I took "great" to imply some aspiration to quality rather than simply success or likability, so my list is based on weighing my likes against both the reach and the grasp of the composer's body of work.
1. Stephen Sondheim
The "greatest," because, quite simply, his accomplishments far and away surpass all others. Even his failures, it has been said many times, are more interesting than others' successes. And those failures often seem less like failures with time, something that cannot be said of all others.
2. Leonard Bernstein
Had he gone on writing for the musical theater rather than devoting his post-West Side life to conducting, I am quite sure he would have been #1.
3. George Gershwin
And had he too lived on and gone on writing for the musical theater, I am sure he would have surpassed Sondheim and Bernstein. The accomplishment and aspiration of Porgy and Bess alone puts Gershwin at the top, but his scores for his 1920s and 1930s musical-comedies injected a level of musicianship that set a revolutionary bar that inspired other composers to be greater.
4. Richard Rodgers
In terms of his effect on the general population, he ought to be #1, but see Sondheim's "Franklin Shepard, Inc." for why he is not.
5. Jerome Kern
Not just for Show Boat, although that would have been enough. Like Gershwin's early scores, Kern's 1920s Princess Theater musical-comedies contained melodies that surpassed the standards of the day and brought wit and intelligence to show music.
6. Irving Berlin
An immigrant Jew for whom English was a second language...yet he took what George M. Cohan and Stephen Foster had established as "American music" and wrote show after show that continued to re-define what American music sounded like. That he did that without being able to play piano--AND writing the lyrics too--is literally mind-boggling.
7. Cole Porter
Just as Kern brought wit and intelligence to musical comedy, Porter brought sex and sophistication. He tried toward the end of his life to keep up with the artistic aspirations of his colleagues, and with Kiss Me, Kate, he created a crown jewel that will endure.
8. Jerry Herman
How could anyone leave him off the list? His relentless optimism and high spirits are irresistible, and he almost single-handedly kept alive the spirit of "musical comedy" while all his colleagues were moving into "musical theater." He loses points for not aspiring higher...but aren't we kinda glad he never tried? The results would probably have been, to quote Gloria Upson, GHASTLY.
9. Frank Loesser
For sheer "world-building," Loesser earns a place for the gangster world of Guys and Dolls and the corporate world of How to Succeed. And he gets aspiration points for Most Happy Fella. But he also deserves a place for the mentoring and inspiring he did for other other composers.
10. I award this position to (in alphabetical order): Harold Arlen and Marc Blitzstein and Jerry Bock and Cy Coleman and John Kander and Frederick Loewe and Harold Rome and Charles Strouse and Jule Styne and Kurt Weill and Maury Yeston.
Oops--one more!
11. Marc Shaiman
In case he's reading this.