It turns out Denethor is in charge because the previous king of the realm, Earnur, gave him the title of Steward of Gondor. Earnur had been challenged to a dual by the Witch King of Angmar, a dangerous foe serving the evil Sauron, and sadly, Earnur was never heard from again, leaving Denethor to rule over Gondor for 35 years.