Dervish said
I think a lot of problems stem from GMs not having a game planned out past the initial premise. You need to be able to plan the general plot ahead of time and know what you want to accomplish. Another thing that helps is being picky about who you accept in a game to make sure they're a good fit. I see way too many GMs accept anyone who applies, and it bites them because more often than not, people drop as soon as they get bored, lost, or they think a few days of inactivity means a game is dead.
All this.
While the GM can't dictate the entire story they should have several key plot devices in place, or objectives that the players have to accomplish. Oftentimes people get so caught up in making good characters that the quality of the story is mostly forgotten about.
Picking players is important too, especially if you do not know them well. I role-play on another site and we have an RP that has been going on for well over half a year, and though there are sometimes huge gaps of inactivity (months even, because life stuff gets in the way of regular posting) we're able to pick up where we left off relatively smoothly because the plot devices that have been put in place are keeping the players interested and the story moving. All the players are pretty well acquainted too, which helps significantly when it comes to OOC communication as well as character interaction.