The loss was the first in December for Florida (4-2) since 1998, a span of 23 games.
''If we would have won that game, we wouldn't have deserved it,'' Florida coach Billy Donovan said. ''West Virginia played with more heart and intensity.''
The Gators took the lead five minutes into the game and held it until Herber's basket put the Mountaineers ahead 66-64. Herber was supposed to hit leading scorer Drew Schifino with a pass off a screen.
Herber had sustained a cut on the top of his shooting hand a few minutes before and he briefly left the game to get the wound bandaged.
Herber entered the game just 1-of-10 from 3-point range but never lost confidence in his shot.
After the go-ahead basket, Schifino grabbed a miss by Florida freshman Matt Walsh, was fouled and hit a free throw with 37 seconds left for a three-point lead.
Matt Bonner, who led Florida with 18 points, hit a jump hook with 24 seconds left to make it 67-66. West Virginia freshman Jarmon Durrisseau-Collins made a free throw with 19 seconds left to close the scoring.
Florida's Brett Nelson had a shot blocked by Schifino with five seconds left and Nelson's off-balance try with one second left fell short.
Despite shooting 51 percent from the field for the game, Florida managed just one basket over the final five minutes.
''Our guys didn't drive the lane very well at all,'' Donovan said. ''They just really didn't execute.''
Schifino, a sophomore, led West Virginia with 16 points, six under his average.
Two normally sure-handed teams were sloppy in the first half. Florida had 11 turnovers and the Mountaineers matched their season average for an entire game with eight.
Florida found its focus to start the second half, scoring the first eight points to pull ahead 38-29, but the lead never got back to double digits.
The game was arranged so that Nelson could play before a hometown crowd. The native of St. Albans, 15 minutes outside Charleston, started his first game after returning last week from a stress fracture in his foot. He scored nine points on 3-of-13 shooting in 30 minutes.