Kelvor Ravenstar
Explorer
In what edition was the DM explicitly granted the "power" to create classes?
That would be 2e, when a set of guidelines for creating custom classes was in the first printing of the DMG IIRC. I don't think they were very successful though, I can recall some experiments my friends and I tried back in high school; giving Paladins the Cleric's spell progression and so on. The balancing factor was mostly the XP table that was created by the process for your custom character.
In some ways I think it was a precursor to Skills and Powers, but put the control of custom classes in the DM's hands, rather than the players.
Of course, custom classes have been around forever, they were a major source of articles back in the days of The Dragon before AD&D and the magazine became just Dragon. 3rd edition was no different either, the DMG suggested making classes with custom spell lists, like the Witch example it printed, and the customization was codified in Unearthed Arcana at the beginning of 3.5.
While these were sometimes presented as player options, explicitly they were the purview of the DM, who decided which options would be available for the campaign, and may have created custom classes, in my experience.