In "the not-too-distant future", eugenics (in the form of conceiving "improved" children by genetic manipulation) is common, and DNA plays the primary role in determining social class. A genetic registry database uses biometrics to instantly identify and classify those so created as "valids" while those conceived by traditional means and more susceptible to genetic disorders are derisively known as "in-valids". Genetic discrimination is forbidden by law, but in practice genotype profiling is used to identify valids to qualify for professional employment while in-valids are relegated to menial jobs.
Vincent Freeman is conceived naturally without the aid of genetic selection, and immediately after birth, his genetics indicate a high probability of several disorders and an estimated life span of 30.2 years. His parents, regretting their decision, use genetic selection to give birth to their next child Anton who is genetically superior to Vincent. Growing up, the two brothers often play a game of "chicken" by swimming out to sea with the first one giving up and returning to shore determined the loser, which Vincent always loses. Vincent dreams of a career in space travel but is reminded of his genetic inferiority. One day, Vincent challenges Anton to a game of chicken and bests him before Anton starts to drown. Vincent saves Anton and then leaves home on his own.
Vincent works as an in-valid, cleaning office spaces including that of Gattaca Aerospace Corporation, a space-flight conglomerate. He gets a chance to become a "borrowed ladder", posing as a valid by using genetic hair, skin, blood and urine samples from a donor, Jerome Eugene Morrow, who is a former swimming star paralyzed by a car accident. With Jerome's "second to none" genetic makeup, Vincent gains employment at Gattaca, and is assigned to be navigator for an upcoming trip to Saturn's moon Titan. To keep his identity hidden, Vincent must meticulously groom and scrub down daily to remove his own genetic material, and pass daily DNA scanning and frequent urine tests using Jerome's samples.
Gattaca becomes embroiled in controversy when one of its administrators is murdered a week before the planned flight. The police find a fallen eyelash of Vincent's at the scene. An investigation is launched to find the murderer, Vincent being the top suspect. Through this, Vincent becomes close to a co-worker, Irene Cassini, and falls in love with her. Though a valid, Irene is aware that her higher risk of heart failure will prevent her from joining any deep space Gattaca mission. Vincent also learns more about Jerome, and discovers that his paralysis is by his own hand; after coming in second place in a swim meet, Jerome became depressed and threw himself in front of a car to attempt suicide.
Vincent is able to repeatedly evade scrutiny from the investigation, and soon it is revealed that Gattaca's mission director was the killer, as the administrator was threatening to pull the mission. Vincent learns the identity of the detective that closed the case, his brother Anton, who has become aware of Vincent's presence. The brothers meet, and Anton warns Vincent what he is doing is illegal, but Vincent asserts he has gotten to this position on his own, and did not need help as Anton did the last time they played chicken. Anton challenges Vincent to one more game of chicken. As the two swim out in the dead of night, Anton is surprised at Vincent's stamina, and Vincent reveals that his trick to winning was never saving any energy for the swim back. Anton turns back and starts to drown, but Vincent rescues him and swims them both back to shore safely using celestial navigation.
The day of the launch arrives. Jerome reveals that he has stored enough DNA samples for Vincent to last two lifetimes upon his return and gives him an envelope to open once in flight. After saying his goodbyes to Irene, Vincent prepares to board but discovers there is one final genetic test before he can board, and he currently lacks any of Jerome's samples. He is surprised when Dr. Lamar, the person in charge of background checks, reveals that he has been aware that Vincent has been posing as a valid. Lamar admits that his son looks up to Vincent and wonders if his son, genetically selected but "not all that they promised", could break the limits just as Vincent has. He then wipes the information from the test, passing Vincent as a valid. As the rocket launches, Jerome dons his swimming medal and burns himself in his home's incinerator; Vincent opens the note from Jerome to find only a lock of Jerome's hair attached to it. Vincent muses on this, stating "For someone not meant for this world, I must confess, I’m suddenly having a hard time leaving it. Of course, they say every atom in our bodies was once a part of a star. Maybe I'm not leaving; maybe I'm going home."