The meaning has drifted, appropriately enough. Betäubungsmittel originally meant painkillers, as you can tell from the word. It's just that now every recreational drug is labeled as such.
Interestingly, in both cases the semantic shift seems to have been caused by the enactment of laws to control drugs. The legal term these days is probably "controlled substance" in English, but "narcotic" now definitely refers to many drugs that are not medically narcotic.