Before Samurai Jack is born, the Black Mass was formed from some sort of explosion that occurred somewhere in the outer space. When it began set of to find its prey, most likely the universe itself, Odin, Ra, and Vishnu arrived to exterminate the mass. After a fierce battle, the three gods finally defeated the Black Mass. Unfortunately, it was not completely destroyed; a fragment of the black mass drifted away from the battle unobserved and crashed into the Earth approximately 65 million years before the rise of Aku. The subsequent impact is believed to have triggered the Cretaceous-Paleogene extinction period, more commonly known as the event which wiped out the dinosaurs.
As life on Earth began to evolve anew, many animals, people, and other forms of life on Earth were devoured by the mass as it continually expanded, likely in an attempt to regain its lost power and essence. When the creature approached Feudal Japan, the Emperor (Samurai Jack's father) attempted to destroy the Black Mass with a magical arrow. However, rather than purging the evil from his land, the arrow's poison instead caused the Black Mass to gain intelligence, self-awareness, and consciousness, becoming sapient and being set free from the ancient tar pit. Taking the name Aku, the newly-recomposed destructive force then went on to destroy the Emperor's kingdom, until he was sealed by the Emperor and later destroyed by the Emperor's son using the katana forged by the gods, eradicating the last strain of the Black Mass permanently. Eventually the Yamata no Orochi killed Odin, Ra, and Vishnu and the other gods resulting the down fall of the Emperor's kingdom.
Before Samurai Jack is born, the Black Virus of Gaia was formed from some sort of explosion that occurred somewhere in the outer space.