I am not aware of a ferry from Gibraltar to Tangiers, but there
are ferries from Algeciras, Spain and Tarifa, Spain, which are
close to Gibraltar, to Tangiers. The ferry from Tarifa to Tangiers
is a high-speed ferry and takes only 35 minutes. However, it only
runs when the weather makes it passable. This means that roughly
30-40% of scheduled Tarifa-Tangier High Speed Ferry rides are
cancelled. The ferry from Algeciras to Tangiers is a much slower
ferry that takes 2-2.5 hours, but since it is much larger, it is
not weather-dependent and runs consistently.