Ranheim was born in St. Louis, Missouri, but grew up in Minnesota. He played his high school hockey in Edina, where he captained his team to a state championship in 1983–84 and was named to Minnesota's All-State Team. The Calgary Flames selected him in the second round, 38th overall, at the 1984 NHL Entry Draft, though Ranhiem opted to play college hockey with the Wisconsin Badgers prior to turning professional. Following a 22-point season in his freshman year of 1984–85, Ranheim won the Badgers' Otto Breitenbach Most Improved Player Award as the team's most improved player in 1985–86 after scoring 17 goals and recording 17 assists in 34 games. He also played with the United States junior team at the 1986 World Junior Ice Hockey Championships where his six goals and three assists helped the Americans win the bronze medal, the first podium finish for the country in World Junior history.