The Cornhuskers (11-10, 2-6 Big Ten) won for the first time in four conference home games.
Brandon Ubel had 14 points and 12 rebounds, and Gallegos added 11 points.
Ubel made two free throws and converted Gallegos' pass through the lane into a dunk at the front end of a 16-7 spurt that gave Nebraska a double-digit lead in the middle of the second half. Gallegos followed Shavon Shields' three-point play with three straight 3s to make it 44-33.
adidas Men's Nebraska Cornhuskers Fired Up Scarlet Performance T-ShirtPrice: $21.99 Shop
Devin Williams' decision last month to sign with an agent and enter the NBA draft has left West Virginia in a tough spot.
Florida State's student government has passed a resolution discouraging Seminoles fans from wearing Native American headdresses at games.
The second annual Gavitt Tipoff Games, eight games between members of the Big East and Big Ten to be played Nov. 14-18, will feature Villanova at Purdue in the opener.