Since settling in Spain, Gammino had changed his name to Manuel.
Detectives' suspicions that the man in the image was the fugitive they were seeking were confirmed when they came across a listing for a nearby restaurant called La Cocina de Manu – Manu's Kitchen.
It had been closed for some time but an image on its Facebook page showed Gammino in chef's whites. The 60-year-old was recognisable from a distinctive scar on his chin. On the menu of the restaurant was a specialty described as "Cena Siciliana" – Sicilian supper.
He was arrested on December 17 but his capture has only now come to light.
"How did you find me? I haven't even phoned my family for the last 10 years," he reportedly asked police when they arrested him.
He will be sent back to an Italian jail where he will serve a life sentence for murder.
Listed by the Italian interior ministry as one of the country's most wanted fugitives, Gammino had been convicted of a range of crimes, including murder, mafia association and drug trafficking.
He was part of a mafia clan from Agrigento in Sicily which was embroiled in a bloody feud in the 1990s with Cosa Nostra, the island's main organised crime network.
First arrested in 1984, he was investigated by high-profile anti-mafia prosecutor Giovanni Falcone, who was assassinated by the mob with a huge car bomb in 1992.
Charged with murder in 1995, Gammino went on the run but was arrested in Barcelona three years later.
He managed to escape from a prison in Rome in 2002 and went on the run again, disappearing without trace.
His arrest last month was the culmination of a two-year operation by detectives in Rome and Sicily.