The original series never stated exactly what year(s) it occurred in. There were a few inconsistent hints.
In "The Squire of Gothos", an early episode, Trelane has been observing Earth as if through a telescope from 900 light-years away. Failing to account for the speed-of-light delay, Trelane reproduces an Earth-like environment approximating the early 19th century or so (he mentions the death of Alexander Hamilton, who died in 1804), implying that the episode takes place in the 27th or 28th century.
In "Tomorrow is Yesterday", a 20th century U.S. Air Force officer threatens to lock Kirk up for two hundred years. Kirk says "That ought to be just about right", implying that the episode takes place in the 22nd century. Kirk's comment was a joke, and it could have been imprecise.
Clearly these are inconsistent, indicating that the producers didn't (yet) have a specific idea about just when the series took place, something that's supported by other sources. Stardates were also not entirely consistent, and there are several different systems for converting between stardates and Gregorian calendar dates.
According to Memory Alpha, the original series took place from 2265 to 2269, almost exactly three centuries after the episodes aired.