What forms first: the dark matter halo or the galaxy? I read that in the early Universe dark matter forms halos, and dust and gas inside those halos formed the first ever galaxies. I am curious to know whether the dust and gas formed the galaxy inside a previously formed halo, or whether the halo formed around the dust and gas.
 A: In the 'standard' model of galaxy formation in a $\Lambda$CDM cosmology (which admittedly has it's fair share of glitches), the halo forms first. This is because in the early Universe, most of the energy density is in the form of radiation (most of the energy is in the form of photons). The gas that will eventually form stars and galaxies is still so hot that it is a plasma, i.e. made of charged particles, which interact strongly with the photons. The result is that any bit of gas that tries to cool and collapse is immediately re-heated by the bath of photons. In the meantime, the dark matter, which feels no such radiation pressure, begins to collapse and form halos. Eventually the Universe expands and cools enough that electrons can bind to protons and make (neutral) hydrogen, which is transparent to the photons and can finally begin to cool and collapse into the now (partially) formed dark matter halos.
You mention dust, but until the first stars have had time to do some fusion reactions, there is nothing in the Universe to make dust out of: there is only H, He, and trace amounts of Li.
