He had played this game in his mind when he was a little boy remembering his father, Gale, toiling as a backup quarterback.
The last time Gilbert came this close to having that moment was his freshman 2009 season at the University of Texas when he took over for an injured Colt McCoy against Alabama in the BCS title game. It was a 37-21 loss, but late in the fourth quarter the Longhorns trailed by three points after he threw a touchdown pass.
On Sunday, with four seconds to play, the Cowboys, with Gilbert as their fourth different starting quarterback in nine games, were at the Pittsburgh Steelers' 23. They had a chance to win a game few thought they could before kickoff, and maybe one they should have won after it.
"Obviously it's been awhile, but that's what you live for as a quarterback," Gilbert said.
Gilbert stepped up in the pocket as the Cowboys' five pass-catchers pressed down the field. He looked for wide receiver CeeDee Lamb cutting across the front of the end zone, but his pass was off, fluttering to the ground incomplete.
Gilbert, 29, took off his helmet and stood with his hands on his hips in emotional pain, not sure if his first career start would be his last if Andy Dalton returns from the reserve/COVID-19 list to play Nov. 22 against the Minnesota Vikings after the Cowboys' bye week.
"Obviously as a competitor, every one of us wants to be out there playing," Gilbert said. "Certainly it's been a long journey to get here, and I think that makes it even a little tougher to swallow not being able to finish that one at the end and not get the victory in my first one."
Had Gilbert pulled off the improbable, if not impossible, win against the unbeaten Steelers, maybe there would be more discussion about what the Cowboys should do at quarterback. And maybe there will still be a discussion because Gilbert was more than passable despite his inexperience.
But the reality is the Cowboys could be in last place in the NFC East the next time they play a game. If the New York Giants (2-7) beat the Philadelphia Eagles (3-4-1) in Week 10, the Cowboys would be looking up at everyone else in the division with seven games to play.
Stunningly, Dallas still has a chance to make the playoffs if it wins the abysmal division.
"It's time," Cowboys coach Mike McCarthy said. "We've got to get going. Obviously, everybody knows what our record is. We need to get going. We need to start stacking wins."
Right now, the Cowboys are stacking losses. They have lost four consecutive games since losing quarterback Dak Prescott for the season because of a broken right ankle. Dalton's concussion was followed by a failed COVID-19 test. Rookie Ben DiNucci struggled in the 23-9 loss to the Eagles, which gave Gilbert the chance to start.
Gilbert brought stability to the offense (243 yards passing, 28 yards rushing), but he had a costly turnover when he was hit as he was trying to throw the ball away at the Steelers' 5. So did Lamb, who caught Gilbert's first career touchdown pass.
In the second quarter, Lamb lost a fumble that Pittsburgh turned into a field goal. Gilbert's fourth-quarter turnover also was turned into three points, but more importantly cost the Cowboys at least a chance at a field goal attempt. Turnovers have been the key to the Cowboys' season. The Cowboys lead the NFL with 18 giveaways. They are a league-worst minus-15 in turnover margin.
"That's been the moral of the season," said Cowboys running back Ezekiel Elliott, who has lost four fumbles. "We've got to get better at that."
And then there is the defense. A unit that gave up more than 200 yards rushing three times in the first half of the season, held Pittsburgh to 46 rushing yards. Quarterback Ben Roethlisberger picked them apart for 306 yards and three touchdown passes, but he had to earn his way even if he was not sacked.
When it counted most, however, the defense wilted. An illegal contact penalty on linebacker Jaylon Smith wiped out a sack/fumble by defensive end Tyrone Crawford that defensive end Aldon Smith recovered. Linebacker Leighton Vander Esch gave up 15 yards with an unnecessary roughness penalty a play later.
On the Steelers' go-ahead drive, Smith had a roughing the passer penalty. Instead of facing fourth-and-10, Pittsburgh had a first down and scored four plays later.
The good the Cowboys' defense had was wiped out by the bad. "You've got to be disciplined in those spots," said McCarthy, who also questioned the calls.
The margins are slim each week, especially when a 2-6 team plays an undefeated team.
The Cowboys' margins are even smaller now.
They have one remaining game against a team currently with a winning record (Baltimore Ravens, 6-2, Dec. 3). They play all three teams in the division again with rematches against the Washington Football Team and Philadelphia at AT&T Stadium. They close the season against the Giants at MetLife Stadium, where Dallas has won three in a row.
The Cowboys aren't really in it, but they're not out of it, either. The bye week comes at a good time, if for no other reason than to take a mental vacation from all that has gone wrong.
"We're making some good steps forward, that's for sure," Elliott said. "We've still got seven games left. We still have to play everyone in the division. I don't think our division is really doing that well this year. I think there's still a shot."
Perhaps as slight as Gilbert's last-second pass.