A question which does not, at present, have a definitive answer. Though the high-five is a more recent invention than many people appreciate. The historical context of the "high" five is, of course, the original five aka "giving skin", "slapping skin", "gimme five", or the "low five". This is a close analog to the handshake and was a popular gesture (practically a shibboleth) among the American black community in the early 20th century. It appeared in film first in The Jazz Singer in 1927 and became co-opted by white mainstream American society through the late '30s and '40s, as evidenced by the Andrews Sisters' singing "Gimme Some Skin, My Friend" (video) in Abbot and Costello's "In the Navy" in 1941.
So the gesture of "giving five" was definitely in widescale circulation in American culture from the 1940s onward, though the high five would still be decades away at that point. There are two core competing claims as the definitive origins of the "high five". One is Dusty Baker of the Los Angeles Dodgers who hit a grand slam home run and while jogging into home he spontaneously gave a high five to teammate Glenn Burke (who had his hand held up high in congratulation). The Dodgers afterward adopted the "high five" as they started calling it as their standard salute, performing on the field, putting it on posters, etc.
A competing claim for the origin of the high five comes from the University of Louisville where teammate Derek Smith appears to have spontaneously invented it on the court (holding his hand up high for a teammate to slap, choosing to go high in reference to their basketball playing) in 1978. They too called it the "high five" or the "high five handshake" and it became a common gesture the team did, and talked about. Despite being just an NCAA team they did have a lot of televised game coverage.
To me I think the evidence is pretty good that both of these origins of the high five were independent and grew to some initial level of "maturity" within their own individual contexts. Given that, it's also fair to assume that other, less well known spontaneous origins of the high five occurred at around the same time. At this point it's probably impossible to track the "genetic heritage" of the high five as a popular expression from late 1978 onward. It's possible that the phenomenon spread in separate waves across the East and West of the US until it had reached sufficient critical mass overall to become ubiquitous.