Few parts of language learning have been subject to as many theories, teaching revolutions, failures and prejudices as learning grammar. Decades ago, it was the main part of language teaching together with translation and many people failed at learning this way as they were missing practice, speaking, native sources. Today, many teachers and language schools and publishers prefer to marginalize grammar in order to present the market with "fun, modern, communicative ways to learn a language." Nothing wrong about focus on conversation and communication, nothing wrong with using more context and native material. But many learners from these communicative courses struggle at communication because of gaps in grammar (and vocabulary). So there is obviously the need to learn it, and there are many ways to do so without emulating the grammar-translation method: by not focusing the majority of your spent time on it, by not making it drive your practice. Any learner can find the least painful (or the most pleasant) way, pace for themselves.
What is grammar and why should I learn it?Edit
Grammar is the inner logic of the language, similar to the physical laws applying to a new universe you have are travelling to. From the bottom-up, it is a system of connections and structures that turns piles of words into understandable messages; from the top-down, it allows the reader to silently make judgements of grammatically - and of the significance of any deviation.
It is not necessarily a set of rules and tables you should memorize by heart, even though there are learners that use this way as part of their learning with great success. It is not necessarily boring, uninteresting and tiring stuff.
Everyone who speaks a language (including their own native one or ones) has learnt the grammar. "Native speaker intuition" peforms the same processes as above in this case. (That is not to argue they are exactly like each other jn their precision: have you ever found yourself - without conscious intervention - regularly between "100's" and "100s"; using the "Oxford comma", and forgetting it? Neither are wrong in their contexts, but these are subconscious choices that explicitly-learned grammars make obvious.)
The grammar learning process usually consists of several phases which overlap and sequence of which is not fixed
1.Finding out the piece of grammar exists, at a meaningful pace
3.Learning how it works
Under are some of the approaches and tools you can choose from, experiment with, squeeze for all their merit and freely combine as you like.