The low-five grew out of African-American cultural tradition and was firmly established by at least World War II. When exactly the low-five went high is up for some debate, as detailed in a very entertaining article published by ESPN the Magazine. The gist is this: Despite his claims, it's very unlikely that Magic Johnson invented the high-five while at Michigan State. More likely, it's an artifact of the women's volleyball circuit, circa 1960.
But most likely is that it was, in fact, invented by Cincinnati Reds manager Dusty Baker upon reaching the home plate of Dodger Stadium after hitting his 30th homerun of the season on Oct. 2, 1977. On the other end of the high-five was outfielder Glenn Burke, who after retirement from baseball was the first gay baseball player to come out of the closet. His frequent use of the high-five in San Francisco's Castro District helped make the gesture a signal of gay pride.