I'm going to suggest something harder than anyone else has suggested, but which will pay off bigger dividends for the rest of your life. Start working now on disconnecting your opinion of yourself from (your perception of) others' opinions of you.
Right now, you have someone you really respect, who, you think, doesn't have a great deal of respect for you. The best reaction you could have, which is in no way easy, is to completely objectify that observation. Pretend you are someone else, observing the two of you. The prof might be a brilliant jerk. You might actually not be nearly as smart as the prof. People are different, after all. This could just be a fact. But when you are looking at it emotionally it brings up fear of inadequacy, etc, etc, etc. If you objectify it, however--pretend you are a Vulcan for a minute--you can see practical paths forward.
What are the practical things you can do? It sounds like you are already working as hard as you know how to. There might be ways you can work smarter. If you were someone else looking in, you might suggest to yourself that you ask your prof "I interpreted this comment you made--'when this takes you so long, why would you even think of that'--to mean that you don't think I'm making rapid enough progress. Is that interpretation correct? I think I'm working as hard as I can. Do you think there might be strategies I could use that would improve my productivity?" Just one example. The idea is to extract yourself from the emotional tangle and just say "well, if this is the case, how can I use the prof as a resource to improve the situation?".
Your life is going to be full of people who you will perceive to either respect or not respect you. Spending effort on figuring out who does or doesn't respect you, and trying to do things specifically to make people respect you, is a huge, frustrating, waste of time. I know, I know, I know, that it is very hard to stop doing. But when you find yourself in this situation, maybe you can think "this is an opportunity to work on caring less about peoples' impression of me, and just focusing on doing the best work I can."
The payoff for this is immense. Personal relationships will improve. You interactions with other people will be more genuine. Ironically, in the end, people will respect you a lot more.
The body of work you do while working under this advisor is going to be your work. If you're doing good work, there will be someone at some point that recognizes that and you will get the practical results out of that which you need to further your career, even if your advisor never thinks you were that good. Therefore, the more you are able to focus on making your work the best it can be, the better it will be for your career.
Try as hard as you can to not care about his opinion of you, and focus on making your work the best that it can be. In the end, after all, that's the best way to make his opinion improve--but that is not guaranteed. Your prof, as I suggested earlier, may be a brilliant jerk. You may possibly just not be as smart as him, period. He might never even be impressed that you worked hard even though you were not as naturally talented [btw--this is a very viable path to tremendous success. Hard work with a little talent will very, very often beat little work with a lot of talent.].
There is some sense in which his opinion of you is completely out of your control. Try to get yourself in the mindset that it is completely out of your control, and that you need to focus on doing your work the best you possibly can.
When you are sure you are doing that, your prof will make his decision--maybe a fair one, maybe not--about whether to respect you or not. But the important thing is that you will respect yourself. And if you have learned to work as hard as you can and not worry about what other people think of you, you will have learned something of inestimable value. It's a hard thing to learn, but you've got a great opportunity to do so, right in front of you. So get to work :).