Gerhart was born in Norco, California. He had a record-breaking career at running back for Norco High School. He set a California state record for rushing yards with 9,662 yards in his career. As of December 2009, Gerhart holds the third highest career total of running yards in national high school football history. He led Norco High School to the CIF Division 5 Southern Section football championship on December 9, 2005. Gerhart was named the Gatorade High School Player of the Year for the state of California and was named California's Mr. Football by Cal-Hi Sports. Gerhart also played baseball and graduated as a valedictorian of his high school class.
In 2008, Gerhart had a breakout season under the direction of then-running backs coach Willie Taggart. He set the Stanford single-season rushing record with 1,136 yards, breaking Tommy Vardell's school record of 1,084 yards. Gerhart was the fifth player in Stanford history to run for 1,000 yards or more in a season, after Darrin Nelson, Brad Muster, Jon Volpe, and Vardell. He scored 15 rushing touchdowns, then the second highest single season total in Stanford history. His 8 games with 100 or more rushing yards were a Stanford record. He tied a Stanford record with four rushing touchdowns against Washington State. Gerhart averaged 5.4 yards per carry and finished third in the Pac-10 in rushing.
In 2009, Gerhart had 1,871 rushing yards and 28 rushing touchdowns. Gerhart led the NCAA Football Bowl Subdivision in rushing yards (1,871), rushing touchdowns (28), total touchdowns (28), and points scored (172 points). His 3,522 career rushing yards are the third most in Stanford history, behind Darrin Nelson's 4,033 yards and Stepfan Taylor's 4,300 yards.
Gerhart rushed for over 100 yards in 11 of his 13 games in 2009. On September 26, 2009, he became only the sixth person in Stanford history to rush for 200 yards in a game, with 200 yards on 27 carries against Washington. On November 7, 2009, Gerhart recorded his second 200-yard game of the season, running for 223 yards against the 7th-ranked Oregon Ducks, breaking the Stanford single-game rushing record previously held by Jon Volpe. On November 28, Gerhart ran for 205 yards and three rushing touchdowns in a 45-38 win over Notre Dame. This was his third 200-yard game of the season. Gerhart again tied the school record for rushing touchdowns in a game by running for four touchdowns against Cal. Gerhart also threw one pass in 2009, completing it for an 18-yard touchdown against Notre Dame.
Gerhart led Stanford to an 8-5 record and its first bowl berth in eight years. He finished the season first in Division 1A in rushing yards (1,871) and rushing touchdowns (28).
Gerhart was a consensus 2009 First-team All-America selection. He was named the 2009 Pac-10 Offensive Player of the Year. He was one of five finalists for the 2009 Heisman Trophy and finished in second place behind Mark Ingram by 28 points, the slimmest margin in the trophy's 74-year history. Gerhart is the winner of the 2009 Doak Walker Award as the best running back in the nation and of the Jim Brown Trophy presented to the top running back in college football by the Touchdown Club of Columbus. Gerhart won the Touchdown Club of Columbus' Archie Griffin Award, which is awarded after the completion of the bowl games to college football's MVP for the season.
Gerhart was a starting outfielder for the baseball team. He passed up the opportunity to play professional baseball after the 2009 season to return for his senior year at Stanford.
Gerhart had the highest Wonderlic score among running backs with 30.
Gerhart was selected in the second round of the 2010 NFL Draft, the 51st overall selection by the Minnesota Vikings. A four-year contract was signed on July 30, and Gerhart's first career rushing touchdown as a professional came in a win against the Washington Redskins on November 28, 2010. Gerhart started five games for the Vikings during the 2011 regular season and rushed for 531 yards.
Gerhart's father Todd was a running back at Cal State Fullerton, played in the USFL, and coached him in high school. Toby is the oldest of six children, all of whom are current or former collegiate athletes. Brother Garth played at Arizona State University and is an offensive lineman with the Cleveland Browns, while his three sisters (who are triplets) play softball: Kelsey and Teagan play at Stanford, and Whitley plays at Cal Poly. Gerhart's youngest brother Coltin is currently a redshirt freshman at Arizona State University.