What makes a great song in your opinion?

Great melody, catchy hook, intelligent lyrics. Good guitar playing doesn't hurt, but not completely necessary to make a great song.
A great songwriter...

"...I’ll wake up some days, and I never really have a problem sitting down with a guitar, there’s always something, you know? I mean, I can do it now. It may not be good, but I can get something together. I love the fact I can do that. They talk about a gift and all that, but the more I go on I realise that it is, like, a gift. We used to say like, you know, ‘he’s got the gift of the gab’ or ‘he’s got the gift of music’ and when you think of it as a gift, it really is very special. So I feel very privileged because not everyone out in that square and can do that, in fact, there's probably hardly any of them walking around there can do it."

--Paul McCartney, 2012
A great song either makes me think or makes me feel. That's about as simply as I can put it.
Great post. It can be a lot of things for me. Can be as simple as a great riff that moves me, a lyric that I really connect with, a melody that gets stuck in my head. If it moves me somehow...
This may be a sub-section, but the solo in a good song should follow and expand upon the melody rather than just a bunch of notes in the correct key and over the matching chords.