I was using google play store with gmail. But when I remove that mail account from the google play both the Google play and gmail apps stop working. How could I fix this?
What I have done when I experience a similar issue was this, put ALL of your (ever precious) music photos and files in a SD card, and do a complete factory data reset. Try this if you haven't fixed it by now and let me know how this works for you.
Play store, gmail, youtube, google play services, play music, google news, google keep, maps, google drive, google photos,
All the above apps are Google products, so when you first start your phone you need to give a google account to run the google play services and google play store. Now when you have installed any google application then it will take the default google account in you accounts (if you have 2 accounts it will ask you choose the account).
So now technically you have removed account then all the google products will stop working.
Although the previous answers identified the problem and explained why it doesn't work, the answer is not so clear in those posts.
Basically, you must have a working Google account on the phone, that will apply to all Google Apps on the device, including the Play Store and Gmail. So the solution is to add a valid Google account to the device and the Play Store should start working again.
If you don't want the Gmail portion, go into Settings - Accounts - Google and turn off syncing of Gmail. The account will still be there, but will not update the Gmail portion.