In the very (very, very, very...) early universe, all the the forces of nature (gravity, electromagnetism, the strong nuclear force, and the weak nuclear force) were all combined into one force known as the Superforce. Matter and energy were not separate forces as they are today. Space-time was folded, compressed, squashed, and bent to fit into.
The Planck Era
By 10-35 seconds, the Superforce had already split up into to forces: gravity and the Grand Unified Theory (GUT). The GUT combined electromagnetism, the strong nuclear force, and the weak nuclear force. Temperatures had fallen to 1027 K. Here, the GUT split into the strong nuclear force, and the electroweak force, along with the rapid formation of quarks, leptons, and their anti-matter equivalent components. When this happened, the universe went through a short but very large expansion. Space-time began to unfold its self and spread out faster than the speed of light. This lasted for 10-32 seconds before the universe resumed it's previous rate of expansion.
At 10-12 seconds, the electroweak force separated into the electromagnetic force and the weak nuclear force. Now, all of the four forces of nature were separated. Particles were continuing to form and constantly were getting annihilated. By 10-6 seconds, quarks were starting to combine into pairs or triplets. Anti-particles annihilated them, but a tiny residue (1 part every billion) was left which was able to form all the matter that is present in the universe. A large number of photons were created at this point.
By 1 second, the temperature had fallen below 1010 K. five seconds afterward, neutrinos and anti-neutrinos stooped interacting with other forms of matter. After the universe was 10 seconds old, protons and neutrons become coming together to form deuterium nuclei . The strong nuclear force took hold between one and five minutes. This brought protons and neutrons together in helium nuclei. This prevented neutrons from decaying into protons and electrons. Even so, energy levels were still so high that atoms were totally ionized and existed as atomic nuclei in a sea of electrons.
About 300,000 years after the big bang, temperature had dropped to about 3000 K. At this temperature, the electromagnetic force allowed electrons to be captured by atomic nuclei. All the electrons that were floating around were captured by the atomic nuclei, and photons were, for the first time, able to travel large distances without being blocked by matter. The universe now became transparent. Matter began to collect to gather into huge clouds and the large-scale structure of the universe began.
The Universe Today