The
TNG Technical Manual has a section on how gravity generators work, but it's mostly technobabble.
What bugs me is the way it's assumed that the gravity can't pass through the hull -- in "Minefield," for instance, we see people weightless when they're standing on the top hull of the ship even though there are gravity plates just 3 meters below them, and there is no material that's opaque to gravity. (TV writers seem to assume gravity is caused by atmosphere.) And then there are the scenes in episodes like DS9: "Melora" showing that you can turn off the gravity in one room even if there's gravity on the levels beneath it. And logically you'd feel sideways pulls from the active gravity plates in the adjacent rooms, whose diagonal vectors would cancel out to a downward vector so it would just feel like lower gravity rather than zero. For that matter, any given gravity source would pull inward spherically -- anything below it or to the side would be as attracted as anything above it. So if there were gravity plates in every deck, the plates above and below you would cancel out and you'd be weightless.
In my Trek novels, I've explained this by positing that gravity plates emit virtual gravitons that are short-lived and decay after traveling a few meters, since they don't want the internal gravity field to interfere with the warp field outside the ship. I think I also said that they're polarized so that you only feel a pull from a plate when you're above it, not below it or off to the side.
A more sensible design would be to have a single gravity source that generates weight for the entire ship, presumably on the bottom deck -- although one design idea I've dabbled with is a cylindrical ship with an FTL core at the center, whose graviton leakage pulling inward is the source of shipboard gravity. Except it would get weaker for each deck further out by the inverse square law, so maybe you'd want a ring design where the habitat section is some distance out from the core, which would make sense if the core's pull were very strong.
Conversely, in my novelette "Hubpoint of No Return," I realized you could use the
Forward catapult effect, which uses the gravitational analog of magnetism to create an acceleration perpendicular to a ring of moving mass, to generate artificial gravity for a station built inside the ring. The FTL ships in my
Arachne trilogy, which use cylindrical warp cages around the ships, can generate a gravity vector within the cage by much the same principle. This means the direction of "down" is toward the rear of the ship, like the ships in
The Expanse or other realistic SF, as opposed to the Trek model where "down" is perpendicular to the direction of motion.
So when did Earth get artificial gravity?
"Space Seed" implies they had it by the time the
Botany Bay was launched, although I like to assume the cryogenic chamber was in a rotating drum within the cylindrical body of the ship. After all, the
Ares IV from VGR: "One Small Step" didn't have AG in 2032.
We don't need it on Earth, we already got plenty of gravity.
But if you reverse the effect -- or just put the gravity plate upside-down on the ceiling -- then you've got antigravity, which would be very useful. It stands to reason that the same scientific breakthroughs that would allow artificial gravity would allow antigravity, or vice-versa, so there's a big incentive to develop it even on the surface. True antigravity would make it immensely easier and safer to launch payloads into orbit and could be the key to colonizing space, assuming its energy demands weren't greater than the demands of rocket launches.