A gravity well is a region of space where the gravity of an object affects and distorts space-time continuum. If seen from a two-dimensional perspective, the "well" would show as an indentation in an otherwise straight line.
Gravity wells can range in intensity depending on the object. In 2294, the USS Jenolan was caught in a Dyson Sphere's gravity well, crashing on the surface. In 2369, the USS Enterprise-D nearly met the same fate; the Dyson Sphere's gravity well was immense due to both the star and system inside the Sphere as well as the Sphere's structural mass. (TNG: "Relics")
A black hole is a dead giant star that has collapsed to the point where the speed needed to escape the gravity well exceeds the speed of light. Strong gravity wells, such as those produced by black holes, cause time dilation in proximity to them. (Bait and Switch: "A Changed World")