A dominant population of optically invisible massive galaxies in the early Universe