When faced with classes and subjects that rattle my confidence I spend some time doing some confidence building and positive manifesting exercises. These can be modified and used really for any goal or purpose where you want to succeed or do more than you thought you could.
The first step is to get clear on exactly what you expect from yourself and why. If you are wanting an A because you feel that you need that grade or that judgment from someone else in order to feel worthwhile - you are wanting that grade for the wrong reasons, and it will elude you.
The correct focus should not be on the "letter grade" but on being successful overall. For me, a B in math or advanced programming is like an A++++ lol. I have to restructure my mindset and know and ACCEPT that if I do my absolute best - whatever grade comes from it is not a measure of "my worth" but a reflection of the effort I gave to my subject.
Those of us who are perfectionists are often that way to our own detriment - getting good grades becomes self-destructive because we are too focused on "proving our worth" to please others - rather than simply accepting ourselves as doing well enough or being enough despite the letter grade.
Does that mean you shouldn't go for the A? not at all - but it means you SHOULD examine why you want that A - is it for the right reason or the wrong ones? We should all strive to do our best in a way that is still joyful! If you get an A but you spend months in misery trying to accomplish it - the reward is just not as sweet. I'd rather stress less and get a B - than pull my hair out for an A.
The next step is to visualize - see yourself understanding the subject matter. Envision yourself succeeding at this course and feel the feelings that being successful give you. Hold this in your mind several minutes each day and truly get into the visualization with feeling and passion.
Every time you get something right or you catch on to a concept that was tricky before - Thank your mind for allowing you to comprehend that subject. Thank the universe for inspiring that knowledge. Give yourself proper credit for the achievements rather than focusing on "well I have to keep going".. stop for a minute and say "I accomplished something and it feels amazing".. That positive energy will help you manifest more goals than berating or bullying yourself.
Remember that you are ONE with the universal mind/wisdom. This is the power and energy that is within all things and allows you to open up to all things. There is nothing you can't understand if you don't barricade your ability to grasp it with fears/anxiety. We can ALL learn. Embrace learning as a natural extension of yourself - just like breathing and motion.
Other Techniques I use...
I also use hemi-sync recordings that are designed for enhancing learning. They work by triggering parts of the brain that allow you to think more efficiently and creatively. I've found that when I am doing a task that requires a lot of brain power listening to these types of music/recordings really do give me a boost.
Remember also that your brain needs regular exercise to function effectively and efficiently, just like the body does. Exercise your brain regularly with puzzles and games designed for that purpose. It does help. I do logic problems and brain training exercises a few times a week and it benefits me greatly.
Exercise your body! A healthy body means more energy and less stress which equate to more stamina and endurance and a clearer, sharper mind. Eat right and exercise! If you feed your body garbage, do not drink water, and don't move - you can't very well get upset that your brain is not functioning at peak capacity ;). Many college students get caught in the junk food/fast food trap due to time constraints etc. Trust me take time to nourish/exercise your body properly and you will have more time, because you will become more efficient.
In short, take inspired action to give your body/mind what it needs to facilitate learning and then get out of your own way. :)