The Talmudic source of the dictum itself: 'יגעת ומצאת תאמין' — if you toiled and found, believe it. The Gemara contrasts this with 'לא יגעת ומצאת אל תאמין,' establishing that genuine Torah achievement requires effortful toil, and that success without effort is not trustworthy.
וְאָמַר רַבִּי יִצְחָק, אִם יֹאמַר לְךָ אָדָם: יָגַעְתִּי וְלֹא מָצָאתִי — אַל תַּאֲמֵן. לֹא יָגַעְתִּי וּמָצָאתִי — אַל תַּאֲמֵן. יָגַעְתִּי וּמָצָאתִי — תַּאֲמֵן. הָנֵי מִילֵּי בְּדִבְרֵי תוֹרָה, אֲבָל בְּמַשָּׂא וּמַתָּן — סִיַּיעְתָּא הוּא מִן שְׁמַיָּא. וּלְדִבְרֵי תוֹרָה לָא אֲמַרַן אֶלָּא לְחַדּוֹדֵי, אֲבָל לְאוֹקֹמֵי גִּירְסָא — סִיַּיעְתָּא מִן שְׁמַיָּא הִיא.
§ Rabbi Yitzḥak said in the style of a previous passage: If a person says to you: I have labored and not found success, do not believe him. Similarly, if he says to you: I have not labored but nevertheless I have found success, do not believe him. If, however, he says to you: I have labored and I have found success, believe him. The Gemara comments: This applies only to matters of Torah, as success with respect to Torah study is in accordance with the toil and effort invested. But with regard to success in business, it all depends upon assistance from Heaven, as there is no correlation between success and effort. And even with regard to matters of Torah, we said this only with regard to sharpening one’s understanding of Torah, as the more one labors, the deeper the understanding of the material he achieves. However, to preserve what one has learned, it is dependent upon assistance from Heaven. Not everyone achieves this, even with much effort.