The morphogenic virus was a degenerative disease created by the rogue Federation agency Section 31 as a means to attack the Founders of the Dominion, and end the threat they posed to the Alpha Quadrant.
In 2372, while the Changelings were threatening Earth with apparent invasion, Captain Benjamin Sisko and Constable Odo provided assistance in trying to hunt down the shapeshifters. Odo submitted to a thorough bio-examination at Starfleet Medical in the hopes of helping Starfleet discover a means of detecting or stopping the Changelings. However, at the same time, Section 31 secretly infected Odo with the disease in the hopes that Odo would carry it back to the Great Link, where it would infect all of the remaining Founders. Odo did just that when he was forced to return to the Link late that year to face 'judgment' for killing another changeling. Odo himself was never meant to contract the virus, but a mutation in his morphogenic matrix, possibly from his being changed into a solid and then back again, caused him to develop symptoms. (DS9: "Homefront", "Paradise Lost", "Broken Link", "When It Rains...", "The Dogs of War")
The disease took time to incubate, and only progressed as the individual Changelings changed form; thus, more rapid form-changing would lead to a more rapid progression of the disease. The disease began to manifest itself in the Female Changeling in early-2375. Odo first learned of the existence of the virus at this time due to his contact with a Weyoun clone, though he still was not aware that he was a carrier. To avoid showing weakness, the Founders attempted to hide the existence of the disease from the Cardassians. Meanwhile, they had teams of Vorta doctors working day and night to find a cure. The Founders would periodically execute these doctors and activate their clones for a "fresh perspective". (DS9: "Treachery, Faith and the Great River", "Tacking Into the Wind", "Penumbra")
Ironically, it was a Federation doctor who was able to cure the Founders. Julian Bashir, the chief medical officer of space station Deep Space 9, realized that Section 31 was responsible for the disease. He captured Section 31 agent Luther Sloan and used a multitronic engrammatic interpreter to extract the cure. The Federation Council debated giving the cure to the Founders, but decided that doing so would strengthen their hand. (DS9: "When It Rains...", "Extreme Measures")
The cure to the morphogenic virus was instrumental in ending the Dominion War. After the Dominion retreat to Cardassia Prime, Odo linked with the Female Changeling, curing her of the disease. The Founder then ordered the Dominion forces to surrender. Odo returned to the Great Link and cured the rest of his kind. (DS9: "What You Leave Behind")