Good question, and the answer is of course complicated. In his foreword to critique of pure reason, he famously cites Hume he has awakened him from his dogmatic slumbers. So it is rather that Hume is a way to overcome rationalism, which Kant regards partly as pure speculation without evidence, not only from the rationalists, but in general all of metaphysics, from the middle-ages up to his time. He wants to create a system which allows metaphysics to be set on a steady course. Later he criticized philosophers who wanted to extend his system, based on, again, what he considered to be speculation without evidence.
His main main line of reasoning is the development of the apriori/aposteriori and analytic/synthetic distinction. This is not so easy to explain, but there are basically different types of judgements. On the basis of that he says that every human being always uses his senses on the one hand, but also has the means to make valid judgements on the other. Wikipedia's summary puts it very well:
Space and time are a form of perceiving and causality is a form of knowing. Both space and time and conceptual principles and processes pre-structure experience.
In this day and age we have obviously much more information about how the brain works, which was perhaps part of the puzzle. Hume wondered how anyone could make judgements based on just a few sensations (inputs)? The answer is then that the brain has very complex methods to form observations and deduce much more abstract relations. So Kant, for the most part, fits in quite nicely with a modern view. Which is why he is regarded as one of the greats.
A lot of the critique of pure reason is an extension of this basis. The book has clearly distinguished parts. The second part, the so called Transcendental Dialectic, is generally considered to be not so important in comparison to the first part. A decent amount of 20th Century philosophy is concerned with the first part, not the second, .
One little known fact is that Albert Einstein read Kant when he was young, and that his theory of relativity can be regarded as a very direct response to Kant's reasoning. Which is partly why Einstein's theories seem to come out of nowhere. Of course the big difference is that they have been verified and provide a quantitive model for the world. I believe Kant would have been delighted to see parts of the riddle explained so accurately.