N.C. State's 157-pound wrestler needed only to avoid getting pinned against North Carolina's James O'Connor in the last match of the night with State winning 16-12.
But Gabrielson caught O'Connor, wrapped him up and took him down for the pin.
It made the outcome that much sweeter for the Wolfpack, which defeated the Tar Heels 22-12 on Wednesday night at Reynolds Coliseum. The loss dropped UNC to 11-4 overall and 4-1 in the ACC.
"I knew I was going to win," Gabrielson said. "I was going to sweep his foot when we were standing up, but he tripped me backwards, so I just stepped over and got him."
N.C. State (7-7, 2-1) avenged a 21-9 loss to the Tar Heels in Chapel Hill on Jan. 16. The Wolfpack never trailed during the contest, and held a 7-0 lead on the strength of Pierre Pryor's major decision against UNC's Chris DiGuiseppe and Dustin Kawa's decision against Mark Canty.
But Tar Heel coach Bill Lam said the key match was between Chris Rodrigues and State's George Cintron at 125 pounds. Cintron scored the match's lone takedown for a tight 3-2 win.
"We win that one and we have a great shot to win," Lam said. "And that gave them momentum. But I will give them credit because they wrestled well and we didn't."
At 141 pounds, UNC's Brad Byers claimed a 6-4 win against Ryan McCallum to make the overall team count 13-12 in favor of the Wolfpack. But State's Jake Giamoni held off Mike Booth with a takedown at the buzzer to give N.C. State a 16-12 lead.
The Tar Heels were without starters Matt Kenny and Jake Reynolds, but Lam said neither absence was a major factor in the loss.