Like spelling, grammar is a vital skill for the writer. True, grammar does seem a tedious subject that brings back memories of hours in stuffy classrooms that could have been better spent on the playground honing conkers skills, but there's a reason for all that tedium. To put it simply, grammar is a tremendously powerful tool for using language. True, it's hard to master and many of the rules are annoying because they're so easy to break and get away with, but there is a great difference between breaking a rule out of ignorance and deliberately breaking one out of conscious decision born of knowledge.
It's a bit like photography. Anyone can take a blurry photo that's poorly framed and overexposed, but for such a photo to become art requires one of two things: Either an artistic judgment that knows when to misframe the shot and throw the camera settings off, or dumb luck. Hint as to which one to pick: Dumb luck doesn't work very well.
It's the same with grammar. knowing how a sentence is put together allows you to write with ease and confidence. You know that your writing is coming out sounding clear and authoritative. You also know that when you break the rules, it will be with the proper effect that you can judge rather than crossed fingers and a muttered prayer.
If it's been while since your school grammar lessons or you feel that you need a bit of revision, the Internet can provide help that's a click away. I recommend this Open University course as a starting point. After that, seek out other courses and books on the subject. Once you've had a refresher or two under your belt, start reading with a trained eye to spot how others use and misuse grammar, then start applying what you've learned to your own writing.
You'll be surprised at the difference it makes.