Clayton Tunnel is a railway tunnel located near the village of Clayton, West Sussex between Hassocks and Preston Park railway stations on the Brighton Main Line. At 1 mile 499 yards (2065 metres) it is the longest tunnel on the route. The turreted and castellated north portal, along with its attached (privately owned) cottage perched directly over the line, is one of the more unusual and photogenic railway features on the London-Brighton Main Line or in Sussex. It is highly likely that John Rastrick was involved in its construction. The south portal of the tunnel is unremarkable.
Another tunnel of the same name is found on the Queensbury Lines, a disused route between Queensbury and Bradford at .
The West Sussex tunnel was the site of an early form of "automatic" signal invented by CF Whitworth. Far from being automatic in operation, this was merely a signal that was operated by the signalman on duty but that returned to 'danger' once the train had passed, by means of a treadle. Clayton Tunnel had such a signal at each end, and it was the failure of the signalman to ensure that the signal had returned to danger that led to the worst ever accident on that line on 25 August 1861.
Three trains left Brighton within a very short time. Having signalled one train correctly, the signalman at the southern portal manually returned the signal to danger too late for the second train, but was unaware that his attempts to alert its driver by waving a flag had been successful. The second train stopped well inside the tunnel, and as it was slowly reversing towards him he misunderstood a 'tunnel clear' message from the north box as indicating the second train had cleared the tunnel when it in fact referred to the first. He then allowed a third to enter and collide with the reversing second train with the loss of 23 lives and 176 injured.