God is dead
Friedrich Nietzsche wrote this in his book The Gay Science (or Die fröhliche Wissenschaft). It is also found in Nietzsche's classic work Thus Spoke Zarathustra (Deutsch: Also sprach Zarathustra), which is most responsible for popularizing the phrase.
The phrase is not meant literally.
The idea is stated in "The Madman" as follows
God is dead. God remains dead. And we have killed him. How shall we comfort ourselves, the murderers of all murderers? What was holiest and mightiest of all that the world has yet owned has bled to death under our knives: who will wipe this blood off us? What water is there for us to clean ourselves? What festivals of atonement, what sacred games shall we have to invent? Is not the greatness of this deed too great for us? Must we ourselves not become gods simply to appear worthy of it?— Nietzsche, The Gay Science, Section 125, transl. Walter Kaufmann
"God is dead" does not mean that Nietzsche believed in an actual God who first existed and then died in a literal sense. It refers to the growth of non-believers in supposedly Christian countries.
"When one gives up the Christian faith, one pulls the right to Christian morality out from under one's feet. This morality is by no means self-evident... By breaking one main concept out of Christianity, the faith in God, one breaks the whole: nothing necessary remains in one's hands". This is why in "The Madman", the passage quoted above mainly addresses nontheists (especially atheists). Their problem (according to Nietzsche) is to retain any system of values without a divine order.
- trans. Walter Kaufmann and R.J. Hollingdale; Twilight of the Idols, Expeditions of an Untimely Man, sect. 5