Again, in order of importance.
5. Writing Skill
6. The ability to take criticism
7. Grammar Skill
When I went to school it was all about grammar and writing correct sentences. Ever diagram a sentence? Everyone did, but I really don't know how much this has helped me.
Through writing, I've learned grammar skills, but if I'd stopped writing in the beginning because I was still worried about grammar to be a good writer, you can be assured I would have stopped there. No one likes to be told that they need perfect grammar before they can write a good book.
What does a writer need?
Guts to keep going. The time to create. The ability to stick to a project that is difficult, because there isn't a boss looking over your shoulder. Sure, you need writing skills, but this comes through writing, not dreaming about writing after you know everything about grammar. And once you begin writing, it takes an insightful writer to take criticism and use it (or lose it) as the case may be.
And that good ole grammar?
That comes last, after all of the writing and editing and learning and working. And yes, through time, it will come to you pretty naturally.
So if you're worried about it.