Emerson is commenting on how many great men followed their own intuition in spite of criticism or misunderstanding from society. He says,
"Is it so bad, then, to be misunderstood? Pythagoras was misunderstood, and Socrates, and Jesus, and Luther, and Copernicus, and Galileo, and Newton, and every pure and wise spirit that ever took flesh." To that he adds "To be great is to be misunderstood."
In context, Emerson also says that great men are not always consistent. In fact, "A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines". Thus, if one is not always consistent, one may be misunderstood. But, since many great men have not be understood by society, then you are you have great company when people don't understand you. What is important, according to Emerson, is that one not violate his or her own nature. You must be true to yourself, even if it mean saying one thing one day and saying something else the next day. That way we show that we trust ourselves and not others to dictate our beliefs.

It might be easier to understand what he meant if you read the whole paragraph:

A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. He may as well concern himself with his shadow on the wall. Speak what you think now in hard words, and to-morrow speak what to-morrow thinks in hard words again, though it contradict every thing you said to-day. — 'Ah, so you shall be sure to be misunderstood.' — Is it so bad, then, to be misunderstood? Pythagoras was misunderstood, and Socrates, and Jesus, and Luther, and Copernicus, and Galileo, and Newton, and every pure and wise spirit that ever took flesh. To be great is to be misunderstood.

The "great" person is great because he or she is in some way different from others, and that difference is often misunderstood. Socrates taught young people to think for themselves, and he was executed for corrupting minors. Copernicus taught that the earth revolved around the sun and was branded a heretic. Martin Luther declared that the Bible was the only infallible source of religious authority and was excommunicated and labeled an outlaw. Yet each one of these men, and the others Emerson names, in some way changed the world.

Another quotation might help: "To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment."

This quote from Emerson's "Self-Reliance" is preceded by a list of individuals who are considered great including Socrates, Pythagoras, Jesus, Copernicus - all people who, in their time, were misunderstood. Emerson asks before this list if it is so bad to be misunderstood. His point is that we often do not understand someone at first; it is only after time that we come to understand what a person says and then, that misunderstood person's words and ideas, are seen from a clearer perspective (that of the distance of time) and the person is considered great. Ultimately, Emerson says, if a person is not understood by others because the person thinks differently from the masses, perhaps that person is actually a great thinker and innovator.