We used to spend a few days studying the placenta in our embryology course. The short answer is, both.
Organ level embryogenesis:
The placenta connects the fetus to the uterine wall, and is the organ by means of which the nutritive, respiratory, and excretory functions of the fetus are carried on. It is composed of both fetal and maternal portions. The placenta can be traced right from the moment when the blastocyst is implanted into the uterine wall, though it takes a good portion of 12 weeks to develop.
After this adhesion, the invasion process starts, during which the cytotrophoblast cells from the trophoblast layer migrate deeper into the decidual layer. The formed vacuoles of the embryo become confluent to the uterus with the formation of the lacunar space 13 days after fertilization. The lacunar space will develop into the intervillous space for blood circulation a few weeks later. The placental progenitor stem cell is the cytotrophoblast cell. These cells are responsible for the cellular growth of the placenta, and they have the ability to proliferate and differentiate throughout gestation. The proliferating cytotrophoblast cells provide, after differentiation, the villous syncytiotrophoblasts as the outer cellular layer of the placenta.
I took the above paragraph from here (http://www.medscape.com/viewarticle/780615_2).You can read more about it here (https://embryology.med.unsw.edu.au/embryology/index.php?title=Placenta_Development.)
But for a serious scholarly study, you might be better off using textbooks.
Genetic basis of placental development:
As for the second part of your question, that is the genetic basis of development for a placenta, allow me to lift a paragraph from a book. You must remember that the embryo as it were, is not a distinct entity genetically, in that it contains half of the genes of the mother, and half of the genes from the father. And this is where biology becomes more complex, beautiful and truly mind boggling. It involves intricate interactions between evolution, organogenesis and developmental biology.
These results [in mice] led to an extraordinary conclusion. Paternal genes, inherited from the father, are responsible for making the placenta – maternal genes, inherited from the mother, are responsible for making the greater part of the embryo, especially its head and brain…
David Haig had begun to reinterpret the mammalian placenta, not as a maternal organ designed to give sustenance to the foetus, but more as a foetal organ designed to parasitise the maternal blood supply and brook no opposition in the process. He noted that the placenta literally bores its way into the mother’s vessels, forcing them to dilate, and then proceeds to produce hormones which raise the mother’s blood pressure and blood sugar. The mother responds by raising her insulin levels to combat this invasion, yet, if for some reason the foetal hormone is missing, the mother does not need to raise her insulin levels and a normal pregnancy ensues.
In other words, although mother and foetus have a common purpose, they argue fiercely about the details of how much of the mother’s resources the foetus may have - exactly as they will later during weaning. But the foetus is built partly with maternal genes, so it would not be surprising if these genes found themselves with, as it were, a conflict of interest. The father’s genes in the foetus have no such worries. They do not have the mother’s interest at heart, except insofar as she provides a home for them.
The father’s genes do not trust the mother’s genes to make a sufficiently invasive placenta; so they do the job themselves…. Modern evolutionary theorists, led by David Haig, now think of the placenta as more like a parasitic takeover of the mother’s body by paternal genes in the foetus. The placenta tries, against maternal resistance, to control her blood-sugar levels and blood pressure to the benefit of the foetus.
Taken from: Matt Ridley, Genome: The Autobiography of a Species in 23 Chapters, Fourth Estate, 2000
For a more scientific explanation, I'd suggest reading the following papers.
Wang, Xu, et al. "Paternally expressed genes predominate in the placenta." Proceedings of the National Academy of Sciences 110.26 (2013): 10705-10710.
Hemberger, Myriam, and James C. Cross. "Genes governing placental development." Trends in Endocrinology & Metabolism 12.4 (2001): 162-168.