If you can, open the new bank account first, then just change the direct deposit to the new account. You will probably still get a physical check the next pay day, but it should go to the new account after that. Once your pay is being deposited to the new account and you are sure you've changed over all automatic payments, then you should be good to close the old account.
I change banks around once a year and haven't had any problems.