Companies in Thailand like to hold your work permit, as it is possible that they might be asked by immigration to show it to them. They will sometimes take your passport if they need to apply for an extension of stay or to extend your work permit - or if they will get a visa for you to visit another country for business purposes.
However, be aware that as a foreigner in Thailand you are required to carry your passport with you at all times as a form of identification, and so police can check that you are in the country legally.
Additionally, your passport (despite how much money you paid for it) belongs to the country that issued it, and not to you. By holding it when they do not strictly need to, your company is holding it illegally.
If I were you, I would go to the Department of Labour and explain your case to them, as they are FIRMLY on the side of employees when there are disputes with their employers, and they can put sanctions on (and fine or even close) companies that mistreat their employees. They can probably sort everything out within a couple of days. Of course, everything is closed this week with the beginning of Buddhist Lent, but on Wednesday or Thursday everything should be up and running again.