Aims. We search for Rayleigh scattering and K and Na absorption signatures from the atmosphere of TrES-3b using ground-based transmission spectroscopy covering the wavelength range from 530 to 950 nm as observed with the OSIRIS instrument at the Gran Telescopio CANARIAS. Methods. Our analysis is based on a Bayesian approach where the light curves covering a set of given passbands are fitted jointly with PHOENIX-calculated stellar limb darkening profiles. The analysis is carried out assuming both white and red noise that is temporally correlated, with two approaches (Gaussian processes and divide-by-white) to account for the red noise. Results. An initial analysis reveals a transmission spectrum that shows a strong Rayleigh-like increase in extinction towards the blue end of the spectrum, and enhanced extinction around the K I resonance doublet near 767 nm. However, the signal amplitudes are significantly larger than expected from theoretical considerations. A detailed analysis reveals that the K I-like feature is entirely due to variability in the telluric O2 absorption, but the Rayleigh-like feature remains unexplained.