This story is supported by a contemporaneous letter written by Mozart's family in 1770, and the biographical notes written by Mozart's sister a couple of decades after the event in 1792.
WikiSource provides* excerpts from two translated documents:
And as according to tradition it was forbidden under ban of excommunication to make a copy of it from the papal music, the son undertook to hear it and then copy it out. And so it came about that when he came home, he wrote it out, the next day he went back again, holding his copy in his hat, to see whether he had got it right or not. But a different Miserere was sung. However, on Good Friday the first was repeated again. After he had returned home he made a correction here and there, then it was ready. It soon became known in Rome, [and] he had to sing it at the clavier at a concert. The castrato Christofori, who sang it in the chapel, was present.
--from Otto Erich Deutsch, Mozart: A Documentary Biography, translated by Eric Blom, Peter Branscombe, and Jeremy Noble. Stanford: Stanford University Press, 1965.
Note: It slightly contradicts the claim made - he needed to hear it more than once.
*WikiSource have deleted this page due to copyright concerns. I believe this counts as "fair use"/"fair dealings", and have no such concerns.