In 1843, one year before his death, Smith dictated a lengthy revelation on marriage, including the possibility of having more than one wife, that became Section 132 of the church's Doctrine and Covenants, a book considered scripture equal to the Bible.
Mormon pioneers brought the practice with them during their 1847 exodus to the Great Basin. During the pioneer days, only about 20% to 25% of Mormon families were polygamous, according to the Encyclopedia of Mormonism.
But the rest of the nation so opposed Mormon polygamy--Abraham Lincoln called the practice, along with slavery, "the twin relics of barbarism"--that the U.S. government refused to allow statehood for Utah unless the church gave it up.
So in 1890, Latter-day Saints President Wilford Woodruff announced a divine revelation that the church was ceasing the practice. Although many LDS polygamists refused to abandon their plural wives and families at the time, since 1904 it has been Mormon church policy to excommunicate members who practice or openly advocate polygamy.
Modern polygamists in Utah cite the Old Testament and D&C Section 132 as permitting plural marriage under certain circumstances and to certain men.
They also contend the LDS Church erred--indeed, lapsed into apostasy--when it banned polygamy. Current estimates of their numbers vary widely between 20,000 and 50,000.