"The study of grammar is a cornerstone of Torah and when studying a lesson in Gemara, one should also have grammar books in front of him." The Pri Megaden, Introduction, 16.
The Rambam considered the study of Hebrew a mitzvah in its own right." Yitzchok Frank, Grammar for Gemara, p. 1, referring to the Rambam on Avos II:1. See also Hilchos Talmud Torah 3:3 and Tosfos Yom Tov on Avos 3:8, d'h: takufos.