Advisor has stopped giving me research projects I’m a fourth-year PhD student. For a while my advisor has been complaining that I don’t take enough ownership of my projects and I just do what he tells me to do, and that I don’t have any critical thinking skills.  He told me that if he left me in a room for six months by myself, I would not be able to produce a paper.

After our last project finished, he just never gave me a new project, and I haven’t had a research project for several months now.

I asked him why he did not give me a new project, and he said that he shouldn’t have to give me projects, because I am the graduate student and I should be coming up with my own projects.  This is very different from all of our previous projects where he came up with the whole idea and I mostly just followed instructions.

Is this a polite way of firing me?
Your advisor is right: a PhD student needs to take more and more ownership as the PhD progresses, as one of the main goals of attaining a PhD degree is to become an independent researcher. Taking ownership includes that a PhD student should develop the ability to formulate research hypotheses and a matching research plan (main milestones, methodology of investigation, time plan) on his/her own, and your supervisor should merely provide feedback on your plan, but not have to write it in main parts anymore. For a "normal" PhD project I would expect that after about half to two-thirds of the allocated time the student has shown strong signs of taking ownership.

As Captain Emacs said in one of the comments, it is indeed high time for you to do your own stocktake of your PhD project and develop your precise research questions / main hypotheses for the remaining PhD, including a draft of the research plan (as above: main steps / milestones, indicative time budget, being clear on the research question addressed in each step, and defining a methodology that can indeed answer the research question, make an analysis of the risks involved [do you have all the equipment / data / source code / ... you need]). Ask your supervisor for feedback, but do not ask for his/her "approval". You are the lead on your PhD project and have all the responsibility for it, and you merely ask your supervisor for expert advice, not for any decisions or his/her blessing.

And if you still find that you do not get a handle on taking ownership, and if you were my PhD student, I would ask you to seriously consider the question whether a PhD is the right thing for you and whether other options (e.g. exiting with a master degree) would make sense.