It’s coming out of his own deep pockets.

Mayoral candidate and supermarket mogul John Catsimatidis is personally responsible for a $3.5 million settlement that his Gristedes stores previously struck with workers who sued over being shortchanged, a Manhattan appeals court ruled yesterday.

The US Second Circuit Court of Appeals sided with a Manhattan federal judge who ruled the Republican candidate was the workers’ “employer” — and thus is responsible for paying off a 2009 settlement in the unfair-labor-practices class-action suit filed in 2004.

Catsimatidis has an estimated worth of $3 billion.

The decision comes two months after the same appeals panel upheld Manhattan federal Judge Paul Crotty’s decision ordering Catsimatidis to fork over nearly $3.9 million in legal fees to the lawyers of the workers.

“This decision reinforces what New Yorkers knew all along — unpaid wages don’t happen in a vacuum,” said Justin Swartz, the lead plaintiffs’ lawyer.

“A person has to be responsible, and that person is John Catsimatidis,” Swartz continued.

“New Yorkers know that, as much as he tries, Mr. Catsimatidis can’t run away from his company’s wrongdoing.”

Representatives for Catsimatidis did not return a call requesting comment.