First, it wasn't 'the singularity' that expanded at the start of the BB. It was an intensely compacted atom. The singularity is that moment BEFORE the expansion started. Let me quote this scientist - According to Professor Edgar Andrews (expert in the science of large molecules) a singularity is:
"an event or situation in which one or more physical quantities (like temperature or density) become infinite in value." He goes on to show how a singularity is involved in the origins of our universe (as per the BB model). Science is not equipped to deal with infinite values because those do not conform to known laws of physics.
Time for our universe had to start at the point of that sudden expansion, for it takes time for matter to expand. The matter inside that tiny, condensed particle took time to spread out into our universe. No time, no universe. Once matter started to expand and move, gravity began to form and affect the particles, eventually causing clumps of gas, then eventually rocks. All of that required - first - time, then gravitational forces.
What is gravity? Science is in the business of describing things and tell us this: Any object that has mass is attracted to any other object that has mass by a gravitational force that is proportional to their masses and inversely proportional to the distance between them squared (and mass is the quantity of matter in a body, and matter is made of particles).
Inertia is what keeps a body moving in a straight line at constant speed unless you apply a force to it. Physicists believe that this might be due to 'empty space' not being empty at all but filled with an 'ocean' of Higgs bosons. Any object that has mass distorts the fabric of space around it, making other objects want to move towards it. The gravitational force is transmitted by as-yet-hypothetical particles called 'gravitons', which apparently don't have any mass.
BB cosmology says the universe was created in a low entropy state and this is where time links in with gravity. The universe can only run downhill from high order to low order - the entropy or randomness can increase but never decrease. So time is simply the measure and experience of change, as the universe is transformed progressively from an initial highly ordered state of low entropy to some final condition of maximum entropy. In this final condition the universe would be in a reversible state - entropy would stop increasing and time would cease to 'flow'. One idea is that immediately after the universe originated, it underwent an 'inflationary' stage in which the force of gravity was actually negative, thus pushing apart space and its contents at a fantastic speed. This inflation, it is argued, smoothed out any irregularities in the chaotic pre-inflationary universe and produced an expanded universe having low entropy. This agrees with the conclusion that energy must have been input to create a low-entropy universe. In this scenario, it was the negative gravitational field that donated this energy. But where did this get ITS energy from? From "a statistical fluctuation from primordial chaos" - a nugget that weighed a mere twenty pounds (9.07 kg) and was just 10 to the power of 26 cm in diameter (about one billionth of one billionth of one billionth of a centimetre). That answers your question, "what was the density"?
The point I want to make to you is that you need to consider the singularity BEFORE expansion (and hence before gravity). Guesses and theories are being made but because a singularity does not square with known laws of physics, this is why science struggles at this point.
Who Made God? Searching for a theory of everything, Edgar Andrews, pp 41, 93, 116-117 (EP Books 2009)