A T-Rex could have run faster than an average human at top speed, but there is a chance that a human could outrun a T-Rex. We can never fully know how fast the Tyrannosaurus Rex ran, but scientists at the University of Manchester in England have come up with animated computer models based on fossils and estimated muscle mass that have helped them compute the probable top speeds of many dinosaurs. The Tyrannosaurus Rex is nowhere near the fastest, topping out at around 18 mph. The fastest dinosaur they computed was the Compsognathus, which ran about 40 mph.
Usain Bolt, the fastest man on Earth, set a world record for running 27.79 mph in the 100 meter sprint in 2009. He is not likely to get eaten by a Tyrannosaurus Rex in the near future, but let's look at a more average human. Running a four minute mile is the standard of all male professional middle distance runners, and translates to a speed of 15 mph. That’s perhaps a little faster than some of us would run a mile, but if we were running for our life it’s a pretty decent estimate.
If speed alone was a factor, a T-Rex would win. However, it would take time for a dinosaur of that mass to get started, and it would not reach its top speed of 18 mph as soon as it would take a human to reach their top speed. Additionally, a Tyrannosaurus Rex is not as agile as a human and would likely get exhausted quickly. So your chances of outrunning a Tyrannosaurus Rex are good if the distance to safety is short, or if you could weave and avoid him until he gets exhausted.