In 2267, when the USS Enterprise was first intercepted by this body, it was eight days distant from Beta VI at warp factor three and Earth was 900 light years away. Gothos had no primary and a variable spatial position.
The normal surface of the planet had no detectable soil or vegetation, an extremely hot, toxic atmosphere swept by tornadic storms, and continuous volcanic action – deadly to terrestrial and most other sorts of life without oxygen and life support.
In reality, Gothos was artificially constructed by the entity Trelane sometime around 2267. Trelane manufactured the world, and various artifacts on it, for the purpose of interacting with individuals kidnapped from the Enterprise. Because Gothos was 900 light-years from Earth, Trelane viewed Earth as it was in the 14th century.
Upon beaming down to the surface, a landing party consisting of McCoy, Jaeger, and DeSalle discovered an oasis-like condition – flourishing vegetation, standard Earth atmosphere, and a large castle-like structure, all manufactured by Trelane.
Although most of Trelane's tricks were accomplished with the help of his mirror machine, a "medium of instrumentality," Spock theorized that the local conditions were maintained by a different machine – a machine too large to fit within Trelane's home. Evidently, this was true, since the atmospheric conditions persisted after Kirk destroyed the mirror machine.
Trelane was able to move Gothos at speeds fast enough to outpace the Enterprise's flight. The method used to accomplish this was not revealed, but the planet was sufficiently maneuverable to thwart standard evasive tactics. After Trelane's parents said it was time to come in, they told Kirk they would sustain the planet's life support conditions before he left. (TOS: "The Squire of Gothos")
Background information Edit
Despite being pushed through space and described as a "lone planet" by Spock, Kirk ordered Sulu to take them "[out of] their solar system", suggesting this planet was in orbit of a star instead of a rogue planet.
Indeed, in an early story outline for "The Squire of Gothos" (dated 11 August 1966), the planet Gothos was part of a solar system, which suddenly started to be detected 1,000 light years from Earth and emitted an incredibly powerful "super-gravity" force that pulled the Enterprise into the star system. Gothos was relatively large and was described as an "odd-looking, crazy-quilt planet."
In the writer's first draft script of "The Squire of Gothos", Gothos was still referred to as part of a solar system, featuring one star. With a magnitude of one and orbited by a moon, it was a hydrogen-helium "radio-star", which the script's stage directions described as "a brilliant sun, with crescented planets orbiting it." The script notes went on to describe Gothos as "one of the cloud-shrouded spheres."
However, upon being visually introduced in later drafts of the episode's script (both the first draft, dated 18 October 1966, and the final draft, dated 26 October 1966), this planet was instead described as "a brilliant, crescented planet." Additionally, Gothos was no longer firmly established as being part of a solar system. The fact that "The Squire of Gothos" was written while rogue planets were not yet known to exist led Kellam de Forest to remark (in a series of notes he submitted on 26 October 1966), "If this artificially created body has no sun, that is the scientific impossibility which will be the first item to be questioned by the crew of the Enterprise."
A line of dialogue in the script (specifically, in the first draft and the final draft) referred to Gothos as an "iron-silica planet, magnitude One-E." In his notes, Kellam de Forest stated, "In absence of sun, this object would not be termed 'planet,' and lacking knowledge of its precise nature would be called 'object' or 'body.' The term 'magnitude' is used in reference to stars and is a measurement of brightness. Suggest: Designation One-E." The description from the episode's teleplay was slightly altered in a script revision page (dated 28 October 1966), which instead referred to the subject as an "iron-silica body, planet-sized magnitude One-E," which is how the line is also phrased in the final version of the episode.