For as long as there has been humans there has been the desire to predict, plan or otherwise determine the sex of children. Parents, for a whole variety of reasons, sometimes prefer their children to be of a particular gender. Social sex selection or human sex selection is the attempt to control the gender of child through a variety of means. It can actually be accomplished medically in several ways, both pre- and post-implantation of an embryo (as well as at birth!).
Gender Planning occurs for a wide variety of reasons. In some cultures, male offspring are desired as they will to inherit property or carry on a family name. Girls often cost a family money in dowries etc. Some western parents desire to have a child of each sex and some fertility clinics that specialise in gender planning will often only assist parents with a pre-existing child of the opposite sex to that now being sought.
There are Direct Medical intervention techniques. Pre-implantation of which there are two types - Sperm sorting (the separation of X Chromosome sperm from Y Chromosome sperm by flow cytometry. The resulting sorted sperm are used in either artificial insemination or in-vitro fertilization (IVF) procedures) and Preimplantation genetic diagnosis (PGD) (Embryos resulting from IVF procedures are genetically tested for X or Y Chromosomes. The embryos of the desired sex are then implanted). Post-implantation which covers Prenatal diagnosis (Amniocentesis and/or ultrasound is used to determine sex of an offspring, leading to subsequent sex-selective abortion of any offspring of the unwanted sex).
There are also Natural Personal planning techniques. These cover both male and female preparations from intercourse timing and diet changes to intercourse positions and vaginal testing. There are many 'old wives tales' covering the planning of children of specific genders but there are also a number of highly successful natural techniques with greater than 80% success rates.