The European Champion's 23-fight unbeaten run was ended by the 36-year-old, whose right hook in the penultimate round felled the challenger, who could not recover and was counted out.
Barker started promisingly and was arguably ahead on points midway through the fight, but the champion came back strongly.
"I wasn't frustrated at all, it was a good job by Barker," Martinez said after the fight.
"I had to neutralise his attack, I had to break him down."
However two right hands in the 10th round rocked Barker and the right hook in the 11th ended the contest.