The epididymis develops from tissue that once formed the mesonephros, a primitive kidney found in many aquatic vertebrates.