Reb Menachem Rikanti (a rishon who lived in the era of the Rosh and the Rashba) is an example of someone who reached very high levels in Torah due to the combination of tefillah and hasmadah. His story is written in the hakdamah of his Sefer, the "Rikanti".
Reb Menachem Rikanti loved Torah, but he was born with a very weak mind. He prayed a lot, and he fasted that Hashem should open his heart and mind to understand Torah. Once, on one of his fast days, as he prayed to be able to learn Torah, he fell asleep in the beis medresh. In his dream, he saw someone holding a bottle of water in his hand. This man woke up Reb Menachem Rikanti and told him to drink from the water. Before Reb Menachem finished drinking, the man disappeared. Reb Menachem returned to his studies, and he saw that his mind was sharp. He had become a new person. That's when he wrote his commentaries on the Torah..."
This occurred when Reb Menachem Rikanti was approximately eighty years old — two years before his petirah. All the tefillos of his life paid off, and in the last two years of his life, he wrote wondrous sefarim, studied [to this day] by scholars. The Steipler Gaon, zt'l, (Chayei Olam vol.2, 12) brings this story and writes, "Even if one has a weak mind, if he places all his strength in studying Torah, he will receive siyata dishmaya and become a gadol in Torah, even if it is beyond his natural abilities."
--Torah Wellsprings
