I just watched 28 Days Later for the second time last night, and I enjoyed it less than the first time I watched it -- but it inspired me to write some instructions on how to repopulate the earth, should it ever become necessary to do so. I'll focus purely on the technical requirements and ignore any questions of morality, pleading exigent circumstances.
If you've got more than 50 unrelated people and a decent mixture of men and women there shouldn't be any problems. Don't allow close intermarriages, and encourage later generations to have children with completely unrelated peers as much as possible. Genetic diversity could be strengthened by sterilizing children with serious defects, and this would probably be a wise move. Women should be encouraged to have as many children as possible, beginning at around ages 18 to 20. Women can have children at younger ages, but without proper medical facilities pregnancies for teenagers can be dangerous for both the mother and the child.
If your base population is smaller, your male/female ratio is badly skewed, or there are existing genetic relationships among your base population, things can become much more difficult. For example, in 28 Days the army platoon found by the heroes has nine men and zero women -- obviously a losing combination. Once the heroes arrive they add one man and two women to the pool, but would that be enough to start a self-sustaining population?
Not likely. If each of the two woman has a child by each of the ten men there will be 20 children, but two sets of ten half-siblings (and ten orthogonal pairs of half-siblings, one from each man). Each child would have nine unrelated potential mates. The real problems would arise later: everyone in the third generation would have four ancestors from the base population, and the same two grandfathers, making them all cousins. Even if distinct lines were kept genetically separated during the second generation the same problems would arise in the fourth generation. Inbreeding would eventually concentrate bad genes and it's doubtful that the population would survive.
The number of women would severely limit the number of children in each generation. Two women can only produce two children per year, and age differences among the children could limit the possible mating combinations among the second generation. Men can safely start having children as soon as they hit puberty, but given medical limitations it's not safe for women to do so -- and if a woman (particularly from the base population) dies (or is sterilized) while giving birth to a child her genetic uniqueness is lost. Far better to wait for the woman to fully mature than risk her health with an early pregnancy that could prevent future childbearing.
If the gender ratio were reversed -- if there were ten women and two men -- the population would still be unsustainable but it would grow more quickly. The best ratio for maintaining genetic variation is 1:1 for obvious reasons:
five men and five women can have 25 distinct offspring, each with only two half-siblings; two men and eight women can only have 16 distinct offspring, each with eight half-siblings.
As raina pointed out in the comments, my math on the end there is wrong. Duh. Five men and five women can have 25 distinct offspring, each with eight half-siblings, leaving 16 (25 - 8 - 1) unrelated peers in their generation. Two men and eight women can have 16 distinct offspring, each with eight half-slibings, leaving seven (16 - 8 - 1) unrelated peers.
In fact, no matter what the gender ratio (as long as it's not 100% either way) a child will always have n - 2 half-siblings, where n is the total population. What makes close-to-even gender ratios better than skewed gender ratios is that they allow a greater total number of distinct genotypes for the child generation.