The most remarkable thing about the village schoolmaster is the amount of knowledge he has. He is very smart. The author lets us know this by describing all the things he can do:
The village all declar'd how much he knew;
'Twas certain he could write, and cipher too:
Lands he could measure, terms and tides presage,
And e'en the story ran that he could gauge
The schoolmaster could write and do arithmetic, of course, but he also knew how to measure land (which would have been very important in his day) and figure out the tides (also important). To gauge means to do even more difficult calculations.
The poet goes on to tell us that he was very good at arguing because “While words of learned length and thund'ring sound Amazed the gazing rustics rang'd around.” It isn’t just that he can keep arguing for a very long time, it is how he argues—with long words that amaze the farmers standing around him.
The poet continues with “And still they gaz'd and still the wonder grew, That one small head could carry all he knew.” In case the reader did not understand by what was said earlier, the poet reminds us one last time that the schoolmaster may have had a small head, but he had great knowledge.