Вопрос ребром тогда. What good is it to know a lot of words if you can't compose a comprehensive sentence with them due to the lack of grammar knowledge?Also when you learn grammar you don't just learn it without picking up your targeted language words. Learning grammar and learning new words are two sides of the same coin.
So for me it's obvious that grammar is essential if you ever want to speak a language well, unless you live in a place where most of the people always speak your desired language.