This quote comes from Gulliver's first experience in Brobdingnag, where he is frightened by the enormous people living there and hides in a cornfield. His thoughts turn, naturally, to Lilliput, where he was the enormous man, and they were tiny; he muses that the relative heights of men in these disparate places are not significant except in comparison to himself and each other. Without a standard of comparison, no man in either country would think himself unusually-sized.
Undoubtedly philosophers are in the right, when they tell us that nothing is great or little otherwise than by comparison... And who knows but that even this prodigious race of mortals might be equally overmatched in some distant part of the world, whereof we have yet no discovery.
(Swift, Gulliver's Travels, eNotes eText)
The quote refers to philosophers who have wondered if man's achievements are meaningless without some "other" to compare. Gulliver was normal, and his accomplishments ordinary, until he met the Lilliputians; to them, his daily actions were feats of extraordinary ability. In stark contrast, his every motion is minutely ineffectual to the Brobdingnagians, who can affect the world in massive ways without much effort. Gulliver, the "normal" man, finds that he becomes either "great" or "little" in comparison to the inhabitants of Lilliput or Brobdingnag because they give him a point of comparison. Without that point, he would be entirely average because the people in his own lands are mostly similar to himself.