I was a lead once, and had an employee that was slow. He took 3 days to make a tool that should only have taken 1 day. He would sometimes get stuck on a bug for hours, and would stay late or come in early to try to figure it out. Sometimes the bugs turned out pretty obvious (to me).
But he had one quality that I really appreciated as a lead: he persisted in what he was doing until he got it done, and without complaining or needing any prodding. So I actually did not mind much at all that he was slow, because I could "fire and forget" him at something that was important but not urgent.
In fact, the main problem I had with him, was that sometimes he would get really angry about some code or a bug, and slam his fist on the desk and/or swear. I mentioned it but you know how code is, when you're really engaged with it, the process can be emotional, and it was hard for him to temper those impulses. It was never really bad, although I was aware that not everyone wanted to pair with him. Which was fine, we generally worked around it, but when allocating tasks, he sometimes got the short end of the stick because of it.
Everyone wants their employees to be the trifecta of talented, hard-working, and nice to work with. But most employees are missing one of those traits, and some are missing two. You sound like a diligent worker but maybe not a genius. That really should be okay for both you and them, and if your manager is good he will appreciate that. But consider, are you nice to work with? If you have a choice, maybe spend your effort that way, instead of worrying that you're not talented (enough).