First, I would make sure that you have ruled out physical causes for this. Anemia, which can come on gradually and has many causes, can make you tired and cause you to lack concentration and energy. Mononucleosis and some other infections can, too.
So can hypothyroidism, other illnesses, and many medications. Existential depression, or frustration with the way things are in contrast to the way you think they should be or would like them to be could certainly be contributing. If this is how you feel, have you tried discussing this with your parents or with some other adult you know and trust? You might want to try to find a counselor who is familiar with giftedness and possibly with
Dabrowski''s theory of positive disintegration.
If you are feeling like you are not learning anything new, and that you haven't learned anything new in too long, you may be able to advocate for yourself or have your parents advocate for you to get more interesting and challenging work.
While you are working on those other things, you might try some simple strategies to motivate yourself so that your grades aren't affected too badly by this:
You might try writing down everything you need to work on or finish each day, and checking each task off as you accomplish it, with some highly motivating reward for yourself (like an hour of video game time, or watching your favorite program, or talking with your friends, or playing music, or reading) that you can't have until everything on the list for that day is done. A full week's worth of getting everything on the list done should earn you bigger reward.
You might try making a contract with a friend, teacher, or parent to check your assignments over every morning or evening to see if you have done your work. Just knowing that you will have to 'fess up relatively soon if you put off the work can sometimes be enough motivation to help you get it done.
You may be able to turn completing your work into a game, or find ways to work some creative or engaging aspects into it. ProTip: I don't recommend the old game of trying to start each sentence of your writing assignments with the next consecutive letter of the alphabet unless you are sure that the assignment won't be more than 23 sentences or so.(Teachers really will notice and most will not be amused if you try to work "xeric" or "xenophobic" and "Zoroastrianism", "zoology", or "zeolites" in as initial words in an English literature essay just so you don't break the pattern...)
I hope you feel better about everything and get your motivation and energy back soon.