Gerry follows two hiking companions who both go by the name "Gerry". "Gerry" is also a slang term, used by both protagonists throughout the misadventure, meaning "to screw up". Van Sant revealed in interviews that Damon, Affleck and his brother Ben had already coined the term before the movie had been named.
The film's plot shares some commonalities with the events surrounding the death of David Coughlin, who was killed by his friend after the two became lost in Rattlesnake Canyon in New Mexico.
The film's style was largely inspired by the work of Hungarian director Bela Tarr, namely its use of extended scenes playing out in uncut master shots. There are a few direct visual quotations from Tarr's Satantango such as a shot following the two protagonists while tumbleweeds blow around them that mimics a shot in Tarr's film where three people walk through a town as a windstorm blows around leaves and trash.
Besides the work of Bela Tarr, the video game Tomb Raider was cited as an influence on the style of the film. Van Sant had mentioned that he hadn't had much experience with video games and was struck by the fact that the lack of the ability to cut away from the action in video games meant having to stay with the characters during travel that would normally be glossed over in films. In an interview with Filmmaker Magazine Van Sant stated "In some ways, Gerry is Béla Tarr fused with Tomb Raider!"
The characters drive to a remote location to hike at a site marked "Wilderness Trail". As they start, they see some other hikers passing by. After some walking, talking, and an impromptu foot race, they decide to head back. Before long, they realize that they are lost. That night, they build a campfire.
Over the next couple of days, the two hikers wander through the wilderness without food or water. They try splitting up for a while, they try to retrace their steps, they try to follow some animal tracks, all to no avail. They grow increasingly irritated with each other as the situation becomes dire.
They eventually find themselves slowly walking, mostly in silence, through a desert. They finally collapse due to fatigue and dehydration. The weaker of the two (Affleck) proclaims that he is "leaving", and reaches towards Damon's character. Damon's character rolls on top of Affleck and wordlessly strangles him before collapsing again.
After some time, Damon's character awakens and realises that a highway is not far away. In the final sequence, he is badly sunburned but watches the passing landscape from the car of the father and son who have seemingly rescued him.
The film was inspired by a real life incident in which two people got lost in the desert, with one eventually killing the other. The story, was relayed to Van Sant by Damon. Van Sant deliberately chose not to look up info on the event as "we didn't want to do their story," instead choosing to use the story as "an inspirational aside."
Besides the news items other influence includes Van Sant's own experience getting lost as well as Chantal Akerman's Jeanne Dielman, 23 quai du Commerce, 1080 Bruxelles (1975). Initially Van Sant planned to shoot the film with digital video, which he said would have resembled "a John Cassavetes film in the desert." however Affleck eventually convinced him to use 35 mm film instead, with Van Sant speaking of the decision noted "once we did that, everything changed". From this decision he began incorporating influences from the film work of Béla Tarr, specifically his use of long takes.
The film is notable for its lack of dialogue. Initially Van Sant "thought we were definitely going to have a lot of long bits of soul-searching dialogue." Although during shooting this never came to pass, with Van Sant noting that the silence was "our version" of that. Van Sant specifically noted that he wanted the dialogue between the two actors to not cover things for the audience's sake; he explains "when [Matt and Casey] are talking, they’re just talking and not pointing out stuff that we’re supposed to know. If they’re talking about something, and we don’t know what they’re talking about, then that’s okay. So long as they know what they’re talking about."
At first Van Sant hoped to shoot the film in Argentina, hoping to avoid a possible Actors Guild strike, but this proved colder than was anticipated and instead Van Sant turned his eye to Wadi Rum, in Jordan, however a travel advisory was in effect due to potential terrorist activities and no shooting occurred there. The team finally settled on Death Valley California. Although the film had a script, it was mutable, and the team regularly disregarded it at points. Because they were unsure of how the film would end if the film was shot in-sequence.
The film is dedicated to the memory of Ken Kesey.