In Star Trek, a gravity well is a distortion of the space-time continuum caused by an object with mass, which can be conceptualized on a two-dimensional surface as a depression: the "well".  In the Star Trek: The Next Generation episode "Relics", the USS Enterprise-D encountered a Dyson Sphere that had an immense gravity well, due to the star at its center as well as the mass of the structure itself. Captain Montgomery "Scotty" Scott's ship was drawn into the sphere's gravity well and crashed on its surface as a result.

Gravity wells are an actual concept in physics. In physics, a gravity well is the gravitational potential field around a massive body - the pull of gravity that a large body in space exerts. Physical models of gravity wells are sometimes used to illustrate orbital mechanics. The larger the body (the more mass) the more of a gravity well it has. The Sun has a large (or deep) gravity well. Asteroids and small moons have much shallower gravity wells. Anything on a planet or moon is considered to be at the bottom of the gravity well. Entering space from the surface of a planet or moon means climbing out of the gravity well, something that often takes a huge amount of energy. The larger a planet or moon's gravity well is, the more energy it takes to achieve escape velocity and blast a ship out of its gravity well.