Alan Guth's cosmic inflation theory posits that about 10^-38 second before the Big Bang which led to our particular universe, a tiny patch of space doubled in size more than 100 times, from sub-atomic size to about 1cm. This "inflation" now ends, the potential energy of the scalar field in this pebble-sized infant universe converts to a hot soup of particles and radiation, and what we call the Big Bang is this hot soup expanding.
The theory explains the start and the end of inflation thus: Permeating that tiny patch was a scalar field, the potential energy curve of which happened to have a peculiar shape which caused negative pressure, and negative pressure caused gravity to be repulsive rather than attractive, hence the inflation. Like a ball perched on a hilltop, that potential energy is not stable, and at some point it would roll down the curve, this potential energy loss turns into matter and radiation, ending the inflation phase.
Now, during the inflation phase, space expanded at a constant energy density, therefore energy appears to be macically created, potentially violating energy conservation. In videos of his talks about inflation, professor Alan Guth explains that the universe's total energy was actually conserved to a net of zero or very low value, because the above (positive) energy was exactly balanced by the negative energy of gravity. I can understand that attractive gravity has negative energy, but shouldn't repulsive gravity have positive energy?