Below are paramount factors that I have pinpointed (but they might differ depending on your genre and taste). I often find myself stalled on one of these points, making it difficult finnishing a track. So, these are just some of my personal ideas that might possibly give some input on identifying your weak spots when it comes to composing. This is quickly posted so let me know if something should be more clear or if you have any questions.
A) Song structure
This is all about maintaining the listeners interest while evoking emotions/attitudes. This includes dynamics over time, meaning that the "energy" of the song evolves (often according to a norm/scheme). It also includes both variation and repetition/familiarity, and if your track is based on chord progressions the ever so difficult art of modulation (key change) will be an efficient way of maintaining interest, variation and energy.
One of the the most basic tricks is to start by making a patterns were you go "all in" arrangement wise, and then strip this arrangement for use in the earlier parts of the song. This requires confidence and will probably make you perfect the stripped down version of the arrangement, chord and rhythm wise, which might also be beneficial for use in the versions with higher energy.
B) Chord progression
Depending on your genre, this is more or less important, although there are very few genres that won't benefit from an interesting chord progression imo. I recommend using a conventional instrument like guitar or piano for making chord progressions. My personal opinion is that an interesting chord progression will at least include any of these: 1) bass inversion, 2) exotic chord(s), 3) colored chords, suspensions or chords with more than 3 voices. Making a melodic song with only in-key triads and root as bass would probally require a really great arrangement or rhythm to be percieved as an interesting song. I think this is often a common obstacle when it comes to music formats with very few channels, but it is possible to overcome by using various techniques.
C) Arrangement
This is an important aspect. To me, the best songs have an efficient arrangement. Simply put there are two extreme paths to choose from: symphonic or rhythmic. The latter will often make it easier to achieve a better mix (get a powerful sound). By switching between different arrangements thru out the song you will bring variation and possibly trick the ear into exaggerating the different qualities of the different arrangements (e g, you can really lift a part by intentionally making a minimal or even worse part before. The ear will percieve the different parts by contrasts, mainly).
To make a good arrangement, it is important to have a repertoir of different song elements depending on your genre, and different ways of implementing them. What type of bass line to use in dub step, and what to use for funk? How to use an ostinato to make a cheesy part even cheesier?
Other than these factors, your song should have an identity (main idea, or at least a distinguishable vibe). Also, small hooks never fail.