Definition -
(1) Conforming to the structure and rules of the language.
(2) Conforming to the set of conventions outlining how to speak and write in an acceptable fashion.

Etymology -
The word ultimately derives from the Greek phrase grammatike tekhne, art of letters (from gramma, letter).

Oxford English Dictionary -
Its first citation in this sense is from 1752:
"I have laboured to refine our language to grammatical purity."
(Johnson Rambler No. 206, 311)

Please comment