Goo is usually present within testing chambers in order to provide a penalty for failure, and to ensure that test subjects are precise with their movements and positioning of their portals.
Objects that have fallen into the goo are irretrievable. In such cases where testing elements like the cubes are needed to solve a test, a replacement will be issued immediately if the first one was dropped into the goo. On some occasions during Portal 2, objects in the goo can be heard fizzling immediately after falling in.
Appearance-wise in Portal, the goo appears as a mixture of red, green, and brown-colored liquid with a swirled appearance. Any contact with the goo will result in continuous damage that would eventually result in killing Chell, P-body, Atlas, Bendy or whoever you are playing as within a few seconds upon contact. As of Portal 2, the goo appears to be mainly brown, often with smoke swirling around its presence like in Portal.