A grammar is an indispensable reference book for language students, second only to a dictionary. A good grammar should at a minimum contain the following:

Many grammars go beyond this and contain notes on idioms and cultural information.

In most univeristy Classics courses, you are allowed to bring a grammar and a dictionary into the final exam.

My indispensible companions were Allan and Greenough's New Latin Grammar, published by Ginn & Company (original copyright 1888), and Greek Grammar by Henry Weir Smyth, Harvard University Press (original copyright 1920). Both have gone through multiple editions, and both are highly recommended for the study of their respective languages.