The connection between these two is that the Fourteenth Amendment, specifically its due process clause, has been used to incorporate the First Amendment and make it apply to the states as well as to the federal government.
The due process clause of the 14th Amendment says that no state shall
...deprive any person of life, liberty, or property, without due process of law...
The Supreme Court has ruled that the "liberty" mentioned in this clause includes the liberties mentioned in the First Amendment.
The incorporation of the First Amendment started in 1925 when the Court incorporated the right to freedom of speech in the case of Gitlow v. New York. Other important aspects of the First Amendment were incorporated in 1940 (free exercise clause in Cantwell v. Connecticut) and in 1947 (establishment clause in Everson v. Board of Education.