Grey goo is a hypothetical end-of-the-world scenario involving molecular nanotechnology in which out-of-control self-replicating robots consume all living matter on Earth while building more of themselves (a scenario known as ecophagy).
The term "grey goo" is usually used in a science fiction or popular-press context. In the worst postulated scenarios (requiring large, space-capable machines), matter beyond Earth would also be turned into goo (with "goo" meaning a large mass of replicating nanomachines lacking large-scale structure, which may or may not actually appear goo-like). The disaster is posited to result from a deliberate doomsday device, or from an accidental mutation in a self-replicating nanomachine used for other purposes, but designed to operate in a natural environment.
Example (by molecular nanotechnology pioneer Eric Drexler):
"Imagine such a replicator floating in a bottle of chemicals, making copies of itself....the first replicator assembles a copy in one thousand seconds, the two replicators then build two more in the next thousand seconds, the four build another four, and the eight build another eight. At the end of ten hours, there are not thirty-six new replicators, but over 68 billion. In less than a day, they would weigh a ton; in less than two days, they would outweigh the Earth; in another four hours, they would exceed the mass of the Sun and all the planets combined - if the bottle of chemicals hadn't run dry long before."
A self-replicating machine is an artificial construct that is capable of autonomously manufacturing a copy of itself using simpler components or raw materials taken from its environment.
A self-replicating machine would need to have the capacity to gather energy and raw materials, process the raw materials into finished components, and then assemble them into a copy of itself. It is unlikely that this would all be contained within a single monolithic structure, but would rather be a group of cooperating machines or an automated factory that is capable of manufacturing all of the machines that make it up.
The factory could produce mining robots to collect raw materials, construction robots to put new machines together, and repair robots to maintain itself against wear and tear, all without human intervention or direction.
The advantage of such a system lies in its ability to expand its own capacity rapidly and without additional human effort; in essence, the initial investment required to construct the first self-replicating device would have an infinitely large payoff with no additional labor cost.
Such a machine violates no physical laws, and we already possess the basic technologies necessary for some of the more detailed proposals and designs.
If proof were needed that self-replicating machines are possible, the simple fact that all living organisms are self replicating by definition should go some way towards providing that proof, although most living organisms are still many times more complex than even the most advanced man-made device.