Báb is an Arabic word which means "gate" or "door" and has been adopted into the main Persian language, Farsi. This word is significant both to Shi'ih Muslims and to members of the Baha'i Faith.
In the "Twelver" branch of Shi'ih Islam, the term refers to a series of intermediaries who represented the hidden Twelfth Imam.
The Shi'ih have always been the minority branch of Islam, and all of their first eleven leaders were killed by the numerically stronger faction of Sunni Islam. While still a child, the Twelfth Imam was believed to have been taken to a concealed location, to avoid the untimely end which the previous Imams had met at the hands of their persecutors. This is referred to as the "lesser occultation," and started in 260 A.H. (874 C.E.). It was believed that communication with him then passed through a messenger known as the Bab.
There was a succession of four such intermediaries, and then in 329 A.H. (944 C.E.) contact with the Twelfth Imam was lost. This is referred to as the "greater occultation." The Shi'ih believe that the hidden Imam is still alive in hiding, and will reappear at the Day of Judgment when the world is about to end. Those who believe in the four Gates believe that the "Fifth Gate" will appear just prior to the reappearance of the Twelfth Imam.
In the 1840s (C.E.), when the message of the Báb began to spread in Persia, many interpreted the title he had chosen as implying that he claimed to be the "Fifth Gate." This misunderstanding probably helped his movement's early growth, by muting some of the potential persecution from Persia's Islamic religious leaders. Later, when it became clear that the Bab claimed to be the bearer of a new Revelation directly from God, the Muslim clergy instigated ferocious attacks against his followers. The Báb was imprisoned in a series of increasingly remote locations, and finally executed, a mere six years after he had first proclaimed his message.
(Thanks to Gritchka for reminding me of this word's Arabic origins.)