Evolution produces complex and structured networks of interacting components in chemical, biological, and social systems. We describe a simple mathematical model for the evolution of an idealized chemical system to study how a network of cooperative molecular species arises and evolves to become more complex and structured. The network is modeled by a directed weighted graph whose positive and negative links represent `catalytic and `inhibitory interactions among the molecular species, and which evolves as the least populated species (typically those that go extinct) are replaced by new ones. A small autocatalytic set (ACS), appearing by chance, provides the seed for the spontaneous growth of connectivity and cooperation in the graph. A highly structured chemical organization arises inevitably as the ACS enlarges and percolates through the network in a short, analytically determined time scale. This self-organization does not require the presence of self-replicating species. The network also exhibits catastrophes over long time scales triggered by the chance elimination of `keystone species, followed by recoveries.