(And a digression at the end)
I’ve been involved in several discussions over the years about this particular issue, and I remain unmoved. I hold to the belief that it does no one any good to continue to conflate “grammar,” “usage,” “mechanics,” “syntax,” and “style” into one big blob called “grammar.”
Because it’s not true, it’s not accurate, and it’s not helpful in the long run—to anyone who wants to truly understand their language. (I won’t say “English,” only because how rude is that? EVERY language has grammar and syntax.)
There’s grammar. That’s the rules (really, there ARE rules!) of how a language (not just English!) is put together. Honestly? You start learning this when you learn to talk. Babies are learning grammar all the time, every day, around the world.
There’s usage. That’s how the words of a language are used. (Obvious definition is obvious.)
There’s mechanics. That’s the picky stuff like spelling and punctuation.
There’s syntax, which is the rules (AGAIN!) of how words relate to one another to make sense. It’s not exactly the same as grammar, but it can’t work without grammar. And grammar can’t work without it. (And again, you’ve already learned this by learning to talk. You don’t know you know it.)
And there’s style, which is … malleable and personal and not readily defined.
Also, here’s where I’ll say that there are many Englishes, each with its own set of rules, and people are using them daily. One is not intrinsically “better” than another. We have arbitrarily said that some are, but it isn’t really so.
I urge you to stop thinking in terms of “good grammar” and “bad grammar” as value judgments on speakers and writers, particularly when you’re not judging their grammar at all but their writing, spelling, and mechanics, and instead look at the register, the purpose, the setting, the audience, the subject matter. Think about “appropriate,” rather than “good/bad.”