When the U.S.S. Enterprise sets out to repair the Argus Array, a telescope that has stopped relaying data for two months, the crew discovers an alien probe near the telescope. Geordi takes Barclay, a notoriously shy crew member, to investigate. As they near the probe, it emits an energy surge that knocks Barclay unconscious, and he and Geordi are transported to Sickbay. Meanwhile, the probe begins to follow the starship, emitting a dangerously high energy level. When the crew is unable to evade it, Barclay amazes everyone by taking charge of the situation and eliminating the probe, saving the ship from destruction.
Turning back to the task of repairing the telescope, Geordi estimates the job will take three weeks. But Barclay, whose confidence and intelligence are continuing to grow, claims he can complete the job in two days. Geordi's pride in Barclay turns to concern, however, when he discovers his crewmate in the Holodeck arguing scientific theory with a simulated Einstein. Geordi insists to Barclay that the encounter with the probe must have precipitated the change and drags him to Sickbay, where Beverly Crusher's examination reveals an astounding change in Barclay's brain tissue that has rendered him the most advanced human being who ever lived.
Although the crew is frightened by the change in Barclay, the fact that they need him to repair the Array convinces them to leave him alone. As the repairs progress, however, the ship's computer is unable to work fast enough, creating the danger of a reactor failure in the telescope that could cause a deadly explosion. Picard orders an immediate retreat, but is informed that the Bridge has lost control of the computer. However, before panic can set in, the computer comes back on line and the crew learns the telescope has been saved. When Picard asks the computer to tell him how the disaster was averted, he is shocked when Barclay's voice answers.
Barclay explains that since the computer was too slow, he connected his brain to the computer to save the Array. Picard demands the engineer disconnect himself, but Barclay replies that this will cause his death. As the crew tries to devise a plan to regain control of the ship, Barclay propels the U.S.S. Enterprise to a point thirty thousand light-years away.
Before the crew can stop Barclay an alien suddenly appears on the Bridge, admitting that the probe transformed Barclay so he would bring the starship to him. The alien goes on to explain that this is his civilization's method of researching new races. Picard agrees to let him scan the brains of crew members if the aliens will transfer their knowledge of tens of thousands of civilizations into the starship's computer. As they talk, Barclay arrives on the Bridge, having been returned to normal by the aliens, but retaining a bit of the confidence and intelligence his experience gave him.