Chance (Peter Sellers) is a middle-aged gardener who lives in the townhouse of a wealthy man in Washington D.C. Chance seems very simple-minded and has lived in the house his whole life, tending the garden, with virtually no contact with the outside world. His cultural and social education is derived entirely from what he watches on the television sets provided by the "Old Man," who raised him. The only other person in his life is Louise, the maid who cooks his meals and looks upon him as nothing more than a child who has failed to grow up. When his benefactor dies, Chance is visited by attorneys handling the estate. Chance tells them about himself how he lived his whole life inside the house after he was apparently abandoned as a baby and left in a basket outside the front door where the "Old Man" took him in and raised him. The lawyers force him to leave his sheltered existence and discover the outside world for the first time.
Chance wanders aimlessly through a wintry and busy Washington in old-fashioned clothes, a homburg hat, suitcase, umbrella and a television remote from his old home. Although finely-tailored many years ago, his clothes are of the style which has now come back into fashion during the period of the story, and so he is presumed to be an expensively well-dressed man of means by those whom he encounters.
That same evening, Chance comes across a TV shop and sees his own image in one of the TVs captured by a camera in the shop window. While watching himself in it he is struck by a car owned by Ben Rand (Melvyn Douglas), a wealthy businessman. Rand's wife Eve (Shirley MacLaine), whom is inside the limo, invites Chance to their home to recover from his injured leg. After being offered alcohol for the first time in his life, Chance coughs over it while being asked his name which, instead of "Chance the Gardener" (which is what he said), is interpreted to be "Chauncey Gardiner."
During dinner at the Rands' home, Chance describes the attorneys coming to his former house and shutting it down where he lived his whole life after the death of "the Old Man". Judging by his appearance and overall demeanor, Ben Rand automatically assumes that Chauncey is an upper class, well-to-do, highly educated business man. Although Chance is really describing being kicked out of the home where he tended to the garden after the death of his legal guardian, Ben Rand perceives it as attorneys shutting down Chance's business because of financial problems after the death of his long-term boss and mentor "the Old Man". Ben even assumes it must have been caused by "kid lawyers from the SEC," obviously attributing it to have occurred at a higher, more sophisticated level than a tax/IRS problem, as most persons would likely have assumed. Sympathizing with him, Ben Rand takes Chance under his wing. Chance's personal style and seemingly conservative and insightful ways embody many qualities that Ben admires. His simplistic, serious-sounding utterances, which mostly concern the garden, are interpreted as allegorical statements of deep wisdom and knowledge regarding business matters and the current state of the economy in America.
Ben Rand is also the confidant and adviser of the U.S. President (Jack Warden), whom he introduces to "Chauncey." Chance's remarks about how the garden changes with the seasons are interpreted by the President as economic and political advice, relating to his concerns about the mid-term unpopularity that many administrations face while in office. Chance, as Chauncey Gardiner, quickly rises to national public prominence. He becomes a media celebrity with an appearance on a television talk show, and is soon on the A-list of the most wanted in Washington society. Public opinion polls start to reflect just how much his "simple brand of wisdom" resonates with the jaded American public. At an upscale Washington cocktail lounge, two important, older, well-dressed men are discussing Chauncey; one says to the other, there is a rumor "he holds degrees in medicine as well as law." Rand, dying of aplastic anemia, encourages his wife to become close to Chance, knowing Eve is a fragile woman.
Rand's doctor (Richard A. Dysart) makes a few inquiries of his own and even after aquiring Chance's fingerprints and a photo of him, becomes suspicious about Chance when there is no record of him ANYWHERE; from attending grade schools to colleges, as well as no history of employment or a police record. Rand's doctor figures out that Chance truly is an actual simpleton gardener, totally oblivious and unaware to the ways of the world. However, the fact that Chance has given Rand an apparent acceptance of his illness and peace of mind with his imminent death makes the doctor hesitant to say anything. He also obviously sees that Chance possesses no guile, no intent to deceive, or any interest which would adversely impact Ben or Eve, or have any adverse effect upon Eve, or the estate, following Ben's death.
Just days before his death, Rand rewrites his will to include Chauncey. At his funeral, the President gives a long-winded read-out of various bon mots and quotes made by Rand over the years, which hardly impresses the pallbearers, who are members of the board of Rand's companies. They hold a whispered discussion over potential replacements for the President in the next term of office. As Rand's coffin is about to be interred in the family Masonic pyramid-like mausoleum, they unanimously agree on "Chauncey Gardiner."
In the final shot, Chance, oblivious to all this, wanders away from the funeral ceremony and through Rand's wintry estate. Ever the gardener, he straightens out a pine sapling and then walks off, across the surface of a small lake. The audience now sees Chance physically walking on water. He pauses, dips his umbrella into the water under his feet as if testing its depth, turns, and then continues to walk on the water as Rand's quote "Life is a state of mind" is superimposed in the background.