Photopigments, consisting of an opsin protein bound to a light-sensitive chromophore, are at the centre of vertebrate vision. The vertebrate ancestor already possessed four cone opsin classes involved in colour perception during bright-light conditions, which are sensitive from the ultraviolet to the red-wavelengths of light. Teleosts experienced an extra round of whole genome duplication (3R) at their origin, and while most teleosts maintained only one long-wavelength-sensitive opsin gene (LWS1), the second ancestral copy (LWS2) persisted in characins and osteoglossomorphs. Following 3R, teleost opsins have continued to expand and diversify, which is thought to be a consequence of the different light environment fishes inhabit, from clear streams to the relative darkness of the deep-sea. Although many recent and a few ancestral opsin duplicates can be found, none predating the 3R were thought to exist. In this study we report on a second, previously unnoticed ancestral duplication of the red-sensitive opsin (LWS3), which predates the teleost-specific genome duplication and only persists in gobiid fishes. This is surprising, since it implies that LWS3 has been lost at least 19-20 times independently along the teleost phylogeny. Mining 109 teleost genomes we also uncover a third lineage, the elopomorphs, that maintained the LWS2 copy. We identify convergent amino acid changes that green-shift ancestral and recent LWS copies, leading to adaptive differentiation and the functional replacement of the original green-sensitive RH2 opsin. Retinal transcriptomes and in-situ hybridisation show that LWS3 is expressed to various extents in gobies and in the case of the whitebarred goby, Amblygobius phalaena, it occurs in a separate photoreceptor to LWS1. Our study highlights the importance of comparative studies to comprehend evolution of gene function.