Ronan ..this is my thinking about your excellent question.
Yes it is all about Gravity – There was a previous question by Tegan on Gravity. Have a look at it.
It is thought (it is therefore a hypothesis – an unproven idea) that dust and hydrogen gas from the ‘Big Bang’ was gravitationally attracted to each other.
As the mass of the dust and gas got bigger it’s gravitational pull got bigger and the more dust and gas it attracted.
Eventually the compact squashed ball of dust and gas started to heat up. It got hotter as it got bigger and eventually the particles of dust and gas began to break up in this hot environment and the hydrogen particles began to come together to make new particles … an atomic FUSION reaction began to occur and the star was born.