This is a somewhat complicated question to answer. Black holes do precede galaxies in the form of primordial black holes which arose in the early Universe from quantum fluctuations. Supermassive black holes (that you find at the center of galaxies) may not come from these, however. There are a few possible ways that supermassive black holes may have formed:
Depending on how strictly you define "galaxy" it does seem most likely that the supermassive black holes formed inside early galaxies, but a type of black hole (primordial black holes) did precede galaxies.
This just in, recent observations have ruled out the possibility that SMBHs gain mass only through merging with other black holes. For more, see this Astronomy.com article.