Ghana has agreed on a $3 billion credit deal with the International Monetary Fund, the multilateral lender said on Tuesday, as the country battles its worst economic crisis in decades.