With runners at first and second, South Carolina's Adam Matthews reached home in the 13th inning on a throwing error by Virginia pitcher Cody Winiarski to break a 2-2 tie and lift the Gamecocks over the Cavaliers in a game that lasted more than 4.5 hours.
Virginia (56-12) started the scoring in the second inning when Kenny Swab's sacrifice ground-out sent Steven Proscia home to give one-seeded Virginia the 1-0 lead.
Playing with an unknown illness, Virginia pitcher Danny Hultzen struck out eight of his first nine batters before leaving the game after three innings.
Freshman Kyle Crockett, undefeated on the season, relieved Hultzen and struck out his first batter.
But South Carolina (53-14) wasted no time taking advantage of the young pitcher soon after.
Christian Walker doubled on the next at bat, then Jackie Bradley, Jr. hit an infield single to put South Carolina runners on first and second.
Crockett hit Adrian Morales later in the inning to load the bases before Brady Thomas sent Walker and Bradley, Jr. home on a deep double to left-center to give the Gamecocks a 2-1 lead heading into the fifth.
The Gamecocks held their lead until the eighth, when the Cavaliers mounted their comeback.
Virginia's John Hicks reached on a fielding error by Gamecock shortstop Peter Mooney that allowed Chris Taylor to score, tying the game at 2.
With the bases loaded and one out for the Gamecocks in the bottom of the eighth, Cavalier closer Branden Kline, who threw 107 pitches on the night, struck out Bradley, Jr. and Morales to send the game to the ninth still tied.
The Cavaliers loaded the bases in the 10th, 12th, and 13th innings but were unable to produce any runs.
The first game of the 2011 CWS best-of-three finals starts Monday night at 8 p.m. ET on ESPN.
For much more from Tucker Sargent, check out his Sportswriter profile at http://bleacherreport.com/users/199399-tucker-sargent or follow him on Twitter below.