RELAX, no employer can force you to resign, certainly not because of the pregnancy situation. As rightly mentioned above by our fraternity members, you have the right and the employer has to grant you leave as per the act. You may extend the days (after the delivery) by using your earned leave (PL) (if you have it with you), but be careful to file/apply for the leave on time so that you do not give any opportunity to your employer to label your absence as a case of indiscipline.
There are ample legislations under which you can raise a complaint. Just be careful that you are punctual for all the days that you put in at work and preserve your official documents (since it could be required in support of your continuous employment) like appointment order, increment letters, salary slips, annual pf statements (form 23), etc.
Good Luck and all the best in advance for the parenthood phase.
Take care, A.B.