The Supreme Court's decision in Roe v. Wade built upon several rulings that found an implicit right to privacy in the US Constitution that, although not specifically spelled out, could be upheld by the federal courts.
The first precedent dates back to 1923, when the Court ruled in Meyer v. Nebraska that a 1919 Nebraska law that forbade children younger than high school age to be taught a foreign language violated the Due Process clause of the Fourteenth Amendment. The Court found that the Fourteenth Amendment:
. . . Denotes not merely freedom from bodily restraint but also the right of the individual to contract to engage in any of the common occupations of life, to acquire useful knowledge, to marry, establish a home and bring up children, to worship God according to the dictates of his own conscience, and generally to enjoy those privileges long recognized at common law as essential to the orderly pursuit of happiness by free men. (Emphasis added)
This started the Supreme Court down the road to becoming the nation's guardian of personal liberties. Griswold v. Connecticut, decided in 1965, greatly expanded the Court's guardian role when it held that a state law banning the use of contraceptives violated a right to marital privacy. The ruling marked the first time the Court discussed "penumbras" emanating from specific amendments in the Bill of Rights, including the First, Third, Fourth, Fifth, and Ninth, and applied to the states through the Fourteenth Amendment, that as Justice William O. Douglas wrote in his majority opinion, "help give them life and opinion." In other words, these penumbras, when considered together with the actual text of the Constitution, created a general right of privacy that could not be infringed by the government.
A year before Roe was decided, the Court ruled in Eisenstadt vs. Baird that the government could not bar contraceptives from unmarried people as well. That set the stage for the Roe decision, which stated that states could not outlaw or regulate any aspect of abortion during the first trimester of pregnancy. Again, the Court relied upon the First, Fourth, Ninth, and Fourteenth Amendments, all of which create a "zone of privacy" that the state couldn't breach, and that this zone, as Justice Harry Blackmun wrote in his majority opinion, was now "broad enough to encompass a woman's decision whether or not to terminate her pregnancy."
The Ninth Amendment states that just because the Constitution spells out certain rights does not mean that the people do not have other rights not included in its text. This is why lawyers who support abortion rights are likely to cite this amendment in their argument—although abortion is not specifically listed in the Bill of Rights or anywhere in the Constitution, they argue that it is the type of fundamental right the Founding Fathers had in mind when stating that the Bill of Rights was not an exhaustive list. Further, lawyers supporting abortion rights argue that the Fourteenth Amendment—specifically,...
the Due Process Clause—prohibits states from depriving citizens of their liberty without due process of law, that liberty includes a right of privacy, and that right of privacy includes a woman's right to make decisions about pregnancy and abortion.
Because Roe v. Wade only specifically prohibited state interference with first trimester abortions, abortion foes have attempted to pass laws that regulate abortions and can pass muster. Planned Parenthood of Kansas City, Missouri v. Ashcroft allowed states to require parental consent or judicial authorization for minors under eighteen to have an abortion. Casey v. Planned Parenthood, while upholding the Roe precedent, did allow that states could regulate abortions to protect the health of the mother, could impose mandatory twenty-four-hour waiting periods, and could outlaw the abortion of "viable" fetuses. Gonzales v. Carhart upheld a federal ban on partial-birth abortions.
As to why the federal government got involved in the abortion issue, it was the foreseeable next step in the nationalization of issues that for nearly two hundred years had been considered local or state matters. Griswold and Roe, with their broad language regarding the right of privacy, became the precedents for Lawrence v. Texas, which ruled state laws banning homosexual sodomy are unconstitutional, and that precedent ultimately begat Obergefell v. Hodges, which held that same-sex marriage is a fundamental right worthy of Constitutional protection.