Not even grammar, just knowing words and being able to connect any idea to another idea
Even if you speak poorly, if you can give a listener an idea that you have a thought they didn’t think, that seems to appear intelligent