The Gamecocks (16-13) led most of the game, but Miami moved out to a 64-60 lead after Guillermo Diaz hit a 3-pointer with 3:51 to go.
Gonner then hit two foul shots, Carlos Powell tied it with a basket and Rocky Trice completed a three-point play that gave South Carolina a 67-64 lead with 22.7 seconds left.
But Miami (16-13) wasn't finished. Robert Hite hit his fifth 3-pointer with 8.5 seconds left, tying the game at 67-all. Gonner then rushed up court, sprinting past Anthony Harris and leaning in for the game-winning basket.
The Hurricanes had one final chance, but Diaz's off-balance 3-point try from the left corner missed the mark.
Powell led the Gamecocks with 18 points. Tarence Kinsey added 11.
Hite topped Miami with 23 points. Diaz had 21 and Harris finished with 14. Diaz and Harris each had four 3-pointers as the Hurricanes matched their season-best of 13 baskets from beyond the arch.
South Carolina will face Arizona State or UNLV in the second round. Three years ago, the Gamecocks topped UNLV on the way to the NIT title game, before losing to Memphis in the final.
Gamecocks coach Dave Odom picked up a win over his former assistant, first year Miami coach Frank Haith, who was hired by Odom as a Wake Forest grad assistant in 1989.
Haith returned to Odom's staff with the Demon Deacons from 1997-2001. He was the South Carolina staff for about a month after Odom took the job four seasons ago, but he left for a job with Rick Barnes at Texas.
Miami looked like a team headed to the NCAA tournament a month ago, standing 15-7 in its first season in the Atlantic Coast Conference. But the Hurricanes lost six of their final seven games.
South Carolina came out strong in their tournament opener.
Powell had two baskets and Kelley a 3, and Miami went nearly four minutes without a basket as the Gamecocks opened up a 22-15 lead midway through the first half. The Hurricanes closed within a point four times, but were never able to overtake South Carolina.
Hite's 3-pointer with 22.3 seconds left in the first half drew Miami within 34-33. Gonner scored inside to finish the first half, giving the Gamecocks a 36-33 lead at the break.
Gamecocks Edge Hurricanes In Opening Round Of NIT
Gamecock Anthem Top Stories
Updated Scout 300 Trend Meter For 2017The updated Scout 300 Trend Meter for the 2017 class takes a look at which schools are trending for each uncommitted member in the Scout 300.
Scout FootballTuesday at 5:40 AM
SEC Recruiting NotebookNews, notes and recruiting scoop out of the SEC...
Scout FootballMonday at 6:00 AM
New Head Coaches Mid-Season ReportThere were a lot of college football head coaching changes before this season. Let's take a look at how a few have fared so far this season.
Scout's Top 25 Recruiting ClassesScout has a new top school in the recruiting rankings. Take a look at capsules for the top 25 classes in the country, including a new number one.