Lower global prices for Ghana’s gold, oil and cocoa exports and a fiscal crisis caused the slowdown, which made Mahama’s government vulnerable to a challenge from the main opposition leader, Nana Akufo-Addo.