Tyrannosaurus rex was a species of Earth dinosaur.
After Jonathan Archer restored a damaged timeline, a Tyrannosaurus rex could be seen in the timestream as the timeline realigned itself. (ENT: "Storm Front, Part II")
Doctor Noonian Soong kept a Tyrannosaurus skull and several small models of this dinosaur in his laboratory on Terlina III. (TNG: "Brothers")
Although not specifically stated on screen,
Tyrannosaurus rex lived during the Cretaceous period.