Gemara: The Essence of the Talmud
The teachings transmitted by the rabbis in the centuries following the destruction of the Second Temple formed the core of what has come to be known as rabbinic Judaism, which still provides the framework for the various types of Judaism practiced today. The most widely studied of these rabbinic teachings are known collectively as the Talmud, which has two parts: Mishnah and Gemara.
The Mishnah is the earlier work, compiled from the teachings of sages living at the end of the Second Temple period and in the century following the destruction of the Temple.
A study book of laws and value statements that express the classical rabbis' vision of Judaism, the Mishnah's preoccupation is promotion of a religious and legal tradition both continuous with the past and practical for life in the post-destruction Diaspora. The Mishnah contains multiple opinions on many laws and does not often suggest which is the most authoritative. The plurality of Jewish practice is preserved in the text.
Sages in both Babylonia (modern-day Iraq) and the Land of Israel continued to study traditional teachings, including the Mishnah, describing the teachings as having been passed down from Moses at Sinai (either literally or figuratively). The oral discussions were preserved, either by memorization or notation, and later edited together in a manner that places generations of sages in conversation with one another. These teachers were interested in bringing greater harmonization between biblical and rabbinic traditions, largely by providing proof-texts for known laws and explaining differences between the biblical and rabbinic versions of laws. This is the origin of the Gemara.
Babylonian vs. Palestinian
There are actually two works known as "Gemara"--the Babylonian Gemara (referred to as "Bavli" in Hebrew) and the Palestinian (or Jerusalem) Gemara (referred to as "Yerushalmi"). The term "Gemara" itself comes from the Aramaic root g.m.r (equivalent to l.m.d, in Hebrew), giving it the meaning "teaching."