For the sake of my answer, I will assume that talent refers to the ability to pick things up easier than others with seemingly less effort or time commitment.
In short, success in school is not a matter of either of those things individually. One can be an incredibly hard worker and achieve mediocre results, as one can be incredibly talented yet not do so well in school. How much you "succeed" in school depends on so many factors that it's almost impossible to boil this down to a yes or no answer because talent and work ethic are not the only factors impacting your success. There is also interest, access to resources, openness, study technique, proactivity, ect. You could go on forever. A better question might be "Which is more important, talent or work ethic?"
In an academic context, how "talented" you are, is largely determined by your ability to think as expected. If you happen to learn in a way based on your perspectives that aligns with, or be open-minded enough to adapt to, the way that information is presented to you, then you will naturally develop your abilities at a faster rate than others. When somebody thinks as expected, they may have a natural intuition for what is being tested and as a result be rewarded within the system.
The term talent in my eyes is usually a generalisation for when you cannot rationalise the accelerated progress of another in comparison to your own or that of the general population. Its use might have a place within the top echelons of physical performance in sport and athletics (however, you would call it genetics in such a case), but in the population size of your state's cohort, it is very unlikely that those who you consider talented are truly that exceptional. There are very very few (if any) people who are born with a gift which could be considered true talent, so don't sell yourself short, you can definitely surpass those who you consider talented (because they probably aren't). Sometimes those who you think to be talented actually work just as much, if not more, than you do but have a better mindset associated with studying than you and as a result are able to be more consistent and achieve better results. Time is another big factor with what makes you think of someone as talented, if they were exposed to concepts at a younger age, then because they had neuroplasticity on their side and have had more exposure to the content, they will have an easier time expanding upon their knowledge / understanding.
It is a fallacy to think that if you put in more effort, more work, more time, then you will achieve corresponding results. For better or worse, outstanding results do not come from a greater investment of time or mental resources all of the time. The extent to which this is true depends on the subject. The fallacy is especially evident within English; depending on your outlook on the writing process, your results can change dramatically, your approach to the subject has a much larger impact on your mark than the quantity of essays you have written. This is because they assess the quality of your work/ideas more-so than the quantity/breadth of your knowledge of the texts. Whereas, within a STEM subject, you are rewarded as long as you get the correct answer; how well you actually understood the process doesn't impact your marks as long as you get the right answer, so rote learning can be relied on to a greater extent. Maybe, you could think of talent as the ability to pick up on the correct way to look at things, to find the right angle to see things such that processes begin to click in place. If you keep on experimenting and keep on scrutinising your methods, then it is only a matter of time until things begin to click into place, maybe people will call you talented then.
I'm sure that you could go over a lot of other things, like environmental conditioning, goals, personality, confidence, mindset, intuition, the societal shift from transformational to transactional learning / development, and the expectations of our ourselves and the education system, but this post is getting long so I'll end it here.
tl;dr: So long as you can change the way you look at things, with enough time and effort you can overcome whatever perceived talent there is, so work ethic (but not work ethic alone) is more important.