The Republic of Ghana is named after the medieval Ghana Empire of West Africa. The actual name of the Empire was Wagadugu. Ghana was the title of the kings who ruled the kingdom. It was controlled by Sundiata in 1240 AD, and absorbed into the larger Mali Empire. (Mali Empire reached its peak of success under Mansa Musa around 1307.)

Source: https://www.ghanaweb.com/GhanaHomePage/history/