Hello and thank you for choosing Just Answer.
There are two things that are possible causes to this. Either the starter is not getting enough voltage or the starter is bad. From your description it sounds like the starter was going out and now is finally out. You may want to hook up a boost or jump and see if the car will start up, if it still does the same it's your starter.