In the UK, when I was at school, we were taught reading, writing, handwriting, basic grammar, spelling and punctuation at primary/junior school. In secondary school, English Language (essays, précis, comprehension) and Maths were the only two obligatory exam courses. Only about a third of students chose to add English Literature to their exam courses.
Even the basics depended on what region you were in. One of my friends went to school in the Midlands (Birmingham area) and, until she started to study French at the age of 40, had never been taught the meaning of "verbs", "adjectives", "nouns" etc. It made learning French very difficult for her because the teacher assumed that everyone in the class knew the basics of grammar. They didn't.
However, I don't think schools these days teach "grammar" as a specific course at any age.