Gilbert attended Huntsville High School in Huntsville, Texas, where he was a three-sport star in football, basketball and track. He played as a defensive back and quarterback for the Huntsville Hornets football team, and was a two-time district MVP. He was a SuperPrep All-region selection and was ranked by that publication as the No. 51 player in Texas. As a junior, he accumulated 785 passing yards and 628 rushing yards. In his senior year, he rushed for over 1,000 yards with nine touchdowns and passed for over 800 yards.
Also a standout track & field athlete, Gilbert was one of the state's top sprinters. He captured two regional titles at the 2010 State 3-4A Regional, winning the 100-meter dash, with a time of 10.47 second, and the 200-meter dash, with a time of 21.29 seconds, while also placing second in the long jump (6.78 meters) and anchoring the 4x100 squad to a second-place finish.
Considered a four-star recruit by Rivals.com, Gilbert was listed as the No. 26 athlete in the nation in 2010.
Gilbert attended Oklahoma State University between 2010 to 2013. As a true freshman in 2010, Gilbert was a backup cornerback and kick returner. For the season he had 18 tackles and returned two kickoff returns for touchdowns. He was named a freshman All-American by Rivals.com. As a sophomore in 2011, he had 48 tackles, five interceptions and two kickoff return touchdowns. He was the defensive MVP of the 2012 Fiesta Bowl. As a junior in 2012, he had 53 tackles and one kickoff return for a touchdown. He nearly entered the 2013 NFL Draft but decided against it. As a senior in 2013, he set the Big 12 Conference record for kickoff return touchdowns with six. He was also a finalist for the Jim Thorpe Award. Gilbert won the 2013 College Football Performance Award as the nation's top defensive back.
After a slow start to his rookie season, where he had missed two games due to an illness and a heel injury, Gilbert finally came alive in week 14 against the Indianapolis Colts, where he had been forced into action due to an injury to teammate K'Waun Williams. He ended the game with four tackles and one interception in which he returned for a touchdown. The Colts would win the game, 25-24.