Gray added a career-high 65 yards receiving in his fifth consecutive 100-yard rushing game.
The win was Texas A&M's fifth straight and keeps Nebraska (9-2, 5-2 Big 12) from clinching the Big 12 North title. The Cornhuskers will have another chance to do it in their regular-season finale next week against Colorado.
The game was tied at 6 when the Aggies (8-3, 5-2) took the lead on Bullock's 19-yard field goal. The drive was kept alive by a roughing the passer penalty on Nebraska on third-and-11 at the Cornhuskers' 49. The drive was kept alive by a roughing the passer penalty on Nebraska on third-and-11 at the Cornhuskers' 49.
The Aggies had third-and-goal at the Nebraska 2 and Gray was stopped for no gain to bring on Bullock.
Taylor Martinez missed the last five minutes of the first quarter and the entire second quarter after injuring his right ankle. He returned for the third quarter and played the rest of the game despite looking hobbled. He was flagged for intentional grounding on first down on Nebraska's last drive and then sacked on third down.
His desperation heave on fourth down was incomplete and the record crowd of 90,079 stormed the field after the game and the Aggies trickled to the locker room through a sea of maroon.
It is the first five-game conference winning streak for the Aggies since 1998 and Nebraska's first road loss of the season.
Nebraska finished with 16 penalties for 145 yards, a situation that had coach Bo Pelini irate and yelling at the officials for much of the game. He was called for unsportsmanlike conduct in the early in the fourth quarter on a particularly long tirade.
Texas A&M took the lead on an 84-yard drive capped by a 28-yard field goal by Bullock early in the fourth quarter. Gray accounted for 55 yards on that drive. It was set up by Trent Hunter's second interception of the game.
Nebraska answered with a long drive of its own, going 78 yards for a 29-yard field goal by Alex Henery to make it 6-6. Dustin Harris knocked down a pass by Martinez on third-and-7 to force the kick.
Martinez finished with 107 yards passing and 17 yards rushing.
Martinez was injured when a teammate appeared to accidentally step on his right ankle in the first quarter and didn't return in the first half. He has missed time recently with a right ankle injury but played the entire game in the win over Kansas last week. A lineman appeared to have caught Martinez on the ankle as he tried to run with about five minutes left in the first quarter.
He was replaced by Cody Green, who couldn't get much going for Nebraska before halftime.
Pelini became angry at Martinez in the second quarter some time after his injury. It's unclear why he got upset, but he got in Martinez's face while he stood on the sideline and yelled for quite some time. At one point Pelini poked at his chest with a finger and a frame freeze from television showed him with his finger pulling at the collar of his jersey as Martinez stood motionless inches from his face.
Nebraska took an early 3-0 lead when Henery hit a 48-yard field goal on the Cornhuskers' first drive of the game. Texas A&M tied it at 3 when Bullock had a 29-yard field goal about nine minutes before halftime.