There is a long-standing confusion concerning the physical origin of the anomalous resistivity peak in transition metal pentatelluride HfTe5. Several mechanisms, like the formation of charge density wave or polaron, have been proposed, but so far no conclusive evidence has been presented. In this work, we investigate the unusual temperature dependence of magneto-transport properties in HfTe5. We find that a three dimensional topological Dirac semimetal state emerges only at around Tp (at which the resistivity shows a pronounced peak), as manifested by a large negative magnetoresistance. This accidental Dirac semimetal state mediates the topological quantum phase transition between the two distinct weak and strong topological insulator phases in HfTe5. Our work not only provides the first evidence of a temperature-induced critical topological phase transition in HfTe5, but also gives a reasonable explanation on the long-lasting question.