What's the earliest example of an intelligent virus/bacterium? There have been a number of comic-book characters (e.g. Sublime, Hlavac, Despotellis), television versions (e.g. the black oil from the X-files, the sentient virus in Farscape), and there was one in a Doctor Who Annual story from 1971, but what was the earliest?
Last & First Men by the mighty Olaf Stapledon published in 1930 has Martians described as a virus-like dissociated group mind;
... In the most developed forms, an immensely complicated neural "telephone" system connected every part of the body with a vast central exchange, the brain. Thus on the earth a single organism was without exception a continuous system of matter, which maintained a certain constancy of form. But from the distinctively Martian subvital unit there evolved at length a very different kind of complex organism, in which material contact of parts was not necessary either to coordination of behaviour or unity of consciousness ... Thus the typical Martian organism was a cloudlet, a group of free-moving members dominated by a "group-mind."
(Public domain PDF in the wiki article links)
From "Science-fiction: The Gernsback Years : a Complete Coverage of the Genre ..." By Everett Franklin Bleiler, Richard Bleiler, I saw this description of a short sci-fi story from 1936:
#1820: "LIQUID LIFE". October 1936. (Reprinted in Conklin, Best of Science Fiction, and in Leinster, Great Stories of Science Fiction.) ...
... A rambling account of an intelligent virus-like life form that is discovered in a local pond.
It was originally published in October 1936 in "THRILLING WONDER Stories"
The novella "Visiting Amoeba" by Brian Aldiss, published in The Canopy of Time has a protagonist who describes himself as an amoeba, although it is perhaps more of a metaphor than a literal truth. As I recall (and I've not read it in decades) he's from our successor universe, and is the most primitive form of life in that universe as the amoeba is (well, could plausibly be claimed to be in 1957) in our universe.
An early television example would be the Doctor Who story "The Invisible Enemy" broadcast in October 1977 which featured an intelligent virus trying to move into the macroscoptic world.
There was also a US series in the 1990s (I think) which i've been trying to find the name of. It featured an intelligent and mutanting virus as part of the main story arc. The series was cancelled after maybe half a dozen episodes and all I can remember is that one of the male characters may have been called Gage and I think they were a team which investigated medical emergencies surprisingly enough.
This is later than the accepted answer, but I think it's worth including for posterity - the 1948 Ray Bradbury short story Fever Dream has a child being taken over by a virus that takes control of his entire body, eventually replacing his brain and becoming an intelligent organism that then sets out to infect others.
The story concerns Charles, a fifteen-year-old boy who is suffering from a severe illness. The local doctor diagnoses it as scarlet fever, but Charles protests that his hand has "changed" and is no longer under his control. He claims that he has been infected by microbes that are not only causing illness, but literally taking over his body and forming a new being. The doctor, however, assures Charles's parents that this is all in his imagination—a fever dream brought on by his illness.
Charles continues to lose control of his body—first his other hand, then his legs—but the doctor continues to assure him otherwise, and gives him antibiotics to deal with his problems. After Charles tries to choke himself, he is restrained to the bed by his parents. One night, Charles begins to lose control of his body, and he feels himself being taken over by the microbes.