Nanotechnology was an advanced form of molecular engineering involving the manufacturing, by molecular chemistry, of tiny machines smaller than living cells.
The applications of the technology were potentially limitless. In medicine, it could result in nanomachines capable of being injected into the bloodstream and traveling to specific areas of the body to begin repairing injuries or aid in the healing of diseased tissue. In structural engineering, it could result in building materials that could reassemble themselves on a molecular level.
Circa the 13th century, an unknown race provided nanotechnology to the inhabitants of the Ilaiyen Archipelago on planet Sigma Niobe II, which kept them free from disease and allowed them to quickly recover from even fatal injuries. These abilities became the stuff of legends around the globe, and even on other worlds. (TOS short story: "As Others See Us")
By the mid 22nd century, the Denobulans were known to have experimented in creating examples of nanotechnology. This form of research was recalled by a United Earth researcher at Arctic One in 2153. (ENT episode: "Regeneration")
The enigmatic Grigari species were known to had made extensive use of nanotechnology which as the secret of their medical technology. They made use of molecular assembly machines that were capable of expertly weaving together both steel and fleshing; uniting the living nervous system to link directly with the computer control circuits. They used this type of technology to save the life of Adrik Thorsen and extend his life span. (TOS novel: Federation)
By the middle of the 24th century, research into this field of science was conducted by both the Federation and the Romulan Star Empire, though neither were successful in producing effective examples for active use. (TNG novel: The Romulan Prize)
A powerful Gamma Quadrant race had developed advanced nanotechnology centuries before 2369. They imprisoned the Ennis and the Nol-Ennis, two of their factions, on a moon and deployed nanoprobe-like devices which would resurrect those who had been killed in an eternal war. A countermeasure against the nanotechnology had been found by 2376. (DS9 episode: "Battle Lines", DS9 novels: Lesser Evil, Rising Son)
In 2381, USS Titan Chief Engineer Xin Ra-Havreii designed upgrades to the vessel's holotank to allow Chief Science Officer Melora Pazlar to operate the system in a zreo-g environment. Part of the control interface included a network of embedded nanosensors in a suit extending from the souls of her boots to a pair of form fitting gloves. (ST - Destiny novel: Gods of Night)