Grand-daddy was a priest in Trinidad. Used to tell us,
"When there's no more room in hell, the dead will walk the Earth."
-- Peter, Dawn of the Dead
Before Hollywood took zombies and ran with with the idea, the concept originated from the Afro-Carribean practices of voodoo, also known as vodou or vodoun. A zombi, whose name derives from the African god Nzambi, was said to be created by dark sorcerers called bokors with the power to bring the dead back to life, and victims of such a procedure would retain no memory, awareness or ability to resist their new master.
Scientists who studied the practice discovered the effect was created using specific drugs. The first, the coup de poudre, contains tetradotoxin, the same chemical found in the flesh of the pufferfish, which creates numbness of the mouth and a feeling of dissociation. In higher dosages, trouble speaking joins with trouble breathing, headache and nausea, followed by loss of motor control and paralysis. Used skillfully, a victim of such a poisoning might be kept alive but in a death-like coma for days. A second chemical, datura, could be administered upon revival to induce suggestibility and obedience indefinitely.
Voodoo itself appeared in Haiti through the slave trade, combining African religious practices with a smattering of Catholicism as a way to continue traditional forms of worship without the slavers finding out. As their culture adapted to the new systems of control, they used traditional legends to describe their oppression, giving renewed life to stories of zombi slaves.
There were also legends of the creatures escaping their shackles. Some sources suggest heavy emotional connections might temporarily restore some of a zombi's faculties. Others claim that the taste of meat or salt might be enough to break the spell of the bokor and allow the deceased the freedom to return to their grave.