The second one is the correct! This is the impersonal use of the verb "haber", so the sentence lacks of subject. The mistake comes when people think "muchas personas" is the subject and try to much the conjugation of the verb. "Muchas personas" is the direct object. In facgt it is the direct object of the sentence. The same happens with the following examples: Habrá muchos invitados. Hubo varios accidentes en la autopista.