Gill finished with 17 points and Nolte provided all eight of his points in a key second-half stretch.
Virginia (29-6) meets eighth-seeded Memphis (24-9), which eliminated George Washington earlier, in Sunday's third round.
Guard Malcolm Brogdon had 14 points, guard London Perrantes added 12 points and guard Joe Harris supplied 11 points for Virginia, which trailed by 10 points late in the first half.
A No. 16 seed has never defeated a No. 1 seed in the tournament's history.
Forward Badou Diagne scored 14 points and guard Warren Gillis tallied 13 points for Coastal Carolina (21-13).
Virginia, which is the Atlantic Coast Conference regular-season and tournament champion, was rescued in part by Nolte, a sophomore forward.
Coastal Carolina tied the game at 47-all on guard Elijah Wilson's 3 with 8:50 remaining. Virginia scored the next six points.
Perrantes made three free throws after he was fouled on a 3-point attempt before the seldom-used Nolte drained a 3-pointer from the corner for a 53-47 edge.
Nolte struck again from beyond the arc, sending the Cavaliers to a 56-48 lead. It was his first game with more than one 3-pointer since Jan. 4 at Florida State.
Nolte hit another jumper during a surge and suddenly, with five minutes remaining, Virginia held a 60-50 lead.
Virginia began the second half on a 9-2 burst, aided by Brogdon's five points during the stretch. Harris hit a 3-pointer and the Cavaliers were up 42-38 before Coastal Carolina regrouped.
Coastal Carolina led 35-30 at halftime, buoyed by shooting 52 percent (13-for-25) from the field and a 16-11 advantage in rebounding.
Coastal Carolina opened a 31-21 lead with four minutes left in the first half. A 6-0 run near the end of the half helped Virginia get some traction.
The Chanticleers suffered a blow when Gillis picked up his third foul with 1:14 to play in the half.
Coastal Carolina, which is located in Conway, S.C., landed in the tournament field by winning the Big South Conference tournament.