What makes a great song? For one a great song is the one that keeps all listeners hooked and itching. It is a mix of great voice, the right pitch and great melody. With the perfect kind of melody, everyone will want to sing along even if they do not perfectly know the lyrics.
You may want to ask the likes of 50 Cent, Eminem, Jay-Z, et al about what makes them leaders in the music world and they will have a straight answer for you: Good Melody! Yes, melody makes all the difference. Melody can change your orientation about a particular genre and can make you fall in love with the song despite your earlier resentments.
How much does beat contribute to the popularity and acceptance of a song? Beat may have some measure of impact, but its impact is not as far-reaching as that of good melody. Good beat may take you this far, but good melody will take you farther in popularity. Nice melodic touch to your music will surely improve on the commercial quality and value of your music; you may want to as Dr. Dre for confirmation.
Length of the music may not be part of the question in the least. Most people are not bothered about how long or short; they are only interested in how melodious.