'The City of the Edge of Forever'
The original title was supposed to be 'Edith gets a Ford Tattoo'.
I've read that Ellison's original script didn't have McCoy as the time traveler. Instead, it was some midshipman selling drugs to the crew who winds up going to the surface to hide from security and jumps through the sentinel.