I believe you're hard on yourself! There are so many aspects of intelligence and nobody can be perfect. You're right... it's not a strictly medical question
, it's more like one for a psychology expert. But I can give you a direction.
I'll start with some examples.
Some people can be very good at interacting with others in social gatherings but may be the worst students.
Others can be great students but can experience trouble when socializing.
Some have great talent in sports, others can't even run without stumbling.
All of them can get better with practice. You've seen it in yourself. Trying hard got you better marks. You probably can't really alter you natural intelligence but you can get better results with trial and experience. Use a step-by-step approach to achieve more and more. Getting the best marks proves you've got potential!
Best of luck in your endeavors.