dgingeri,
If you're talking about the 2nd film, you have to remember a couple of things:
1. The gravity didn't just "disappear", they were having problems with it fluctuating. Hence Kirk & Scott went from running on the floor down the corridors to running along the walls & ceilings, because "up" was fluctuating inside the ship. They were aware of it, however, & compensating by changing direction as they ran; other crewmen were, as shown in the film, caught by surprise or unable to adjust their positions, hence why they were sliding around in different directions.
2. Microgravity <> "zero gravity". Objects in orbit are *orbiting* because of the pull of gravity from the heavier object (i.e. Earth). Obviously, for their "artificial gravity" to work on a spaceship when its nose is pointing "down" towards a planet, it has to counteract the "natural gravitational pull" in some manner. Even spaceships & probes that have achieved "escape velocity" are still under the influence of gravity (including the Sun's); they're going fast enough that the pull of gravity won't bring them back down to the surface, but it will still affect their trajectory in space (which is why NASA & other space agencies spend a lot of time calculating when they can launch interplanetary probes, how much fuel they'll need, & how long it will take to get to the target). Heck, even the Sun's gravity will affect you long after the pull of Earth's gravity becomes nearly impossible to measure -- otherwise we wouldn't have things like the outer planets, Pluto, & the Oort Cloud orbiting the Sun. But if your "artificial gravity" isn't working properly for regular "up vs. down" operation, it's obviously going to have problems with counteracting outside gravitation forces.
3. No matter how high the realism factor is in a science-fiction film/show/book, the key word is *fiction*. If you're going to complain about a science-fiction film being "realistic" in its science, then you need to remember there are a whole host of things that aren't "real" but have been shown in science-fiction for decades:
-- transferal of information from a computer into an individual's memory, including the ability for them to not only remember the information but transform the information into instant "muscle memory" short-term modifications to the body's physical abilities (i.e. having the abilities of a lifetime student of martial arts without spending a single second practicing in the dojo);
-- genetic mutation caused by radiation/chemical/other source exposure that results in changes (usually granting "super-abilities") to the subject but don't result in real-world effects like cancer & death, or are able to drastically increase/decrease the size/shape/strength/intelligence/other characteristics of the subject (including non-human subjects like gila monsters, tarantulas, ants, locusts, gorillas, snakes, etc.);
-- human-sized powered exoskeletons allowing you to fly like a jet fighter, lift objects like a construction crane, run as fast as a motorcycle, & grant more firepower than a company of Abrams tanks;
-- Both FTL *and* STL drives & other systems (i.e. cryogenic sleep chambers) that allow people to reach other planets (including within the Solar System) within a regular person's lifetime;
-- hand-portable energy weapons that provide more punch than a Barett sniper rifle, but can be carried in a hip holster;
-- medical technology that allows for "near-instant" healing (i.e. healing time measured in seconds or minutes, instead of days/weeks/months) of cuts, bruises, scrapes, broken bones, gunshot wounds, & other trauma, or for the healing of illnesses & diseases that currently either don't have 100% successful cures or have no cures whatsoever;
-- cloning technology that allows for an entire creature to not only be "grown" within a matter of hours or days, but also allows for the near-instantaneous transfer of memories & personality traits into the subject;
And so on.