The gemara you are referring to is Beitza 15b:
אָמַר רַבִּי יוֹחָנָן מִשּׁוּם רַבִּי אֱלִיעֶזֶר בְּרַבִּי שִׁמְעוֹן: אָמַר לָהֶם הַקָּדוֹשׁ בָּרוּךְ הוּא לְיִשְׂרָאֵל: בָּנַי, לְווּ עָלַי, וְקַדְּשׁוּ קְדוּשַּׁת הַיּוֹם, וְהַאֲמִינוּ בִּי וַאֲנִי פּוֹרֵעַ.
Rabbi Yochanan said, attributed to Rabbi Eliezer beRabbi Shim'on: The Holy Blessed One said to Israel, "My children, borrow for me, and declare the sanctity of the day, and have faith in me, and I will repay [the loan].
But there is a contrasting gemara at Pesachim 112a where Rabbi Aciva is quoted as saying: "עֲשֵׂה שַׁבַּתְּךָ חוֹל וְאַל תִּצְטָרֵךְ לַבְּרִיּוֹת — Make your Shabbos [like a] secular [day], and do not become beholden to other people." (Although Rabbi Aciva does say one should borrow money to pay for four cups of wine at the seder.)
The Shulchan Arukh (OC 242:1) writes:
אפילו מי שצריך לאחרים אם יש לו מעט משלו צריך לזרז עצמו לכבד את השבת ולא אמרו עשה שבתך חול ולא תצטרך לבריות אלא למי שהשעה דחוקה לו ביותר על כן צריך לצמצם בשאר ימים כדי לכבד את השבת מתקנת עזרא שיהיו מכבסים בגדים בחמישי בשבת מפני כבוד השבת:
Even regarding someone who depends on others for his livelihood, if he has [even just] some [food] of his own, he must make an effort to honor the Shabbat. The halachic devisors [poscim] who said, "make your Shabbat as a weekday so that you do not rely on others," only said it regarding one in a time of dire need. Therefore [a person who has a bit of their own food, i.e. the initial situation discussed,] must practice restraint during the week so that he can honor the Shabbat. This is based on the decree of Ezra, that people should wash clothes on Thursday (i.e. prepare during the week) for the honor of Shabbat.
(The Rama does not address this point, so Ashkenazim are apparently on the same page.)
Rav Melemed (Peninei Halkhah 1:12.3) is the earliest halachic source I could find that quotes Rabbi Yochanan. (That's someone alive today!) And he does so in particular with regard to Yom Tov, not Shabbos. I don't know why. Anyway, he writes:
הנמצא בגרעון זמני, ראוי שיכנס למשיכת יתר בבנק או שיקח הלוואה כדי לשמוח בחג. ואל ידאג שמא תארע לו תקלה ולא יוכל להחזיר את חובו, ש"אמר הקב"ה לישראל: בָּנַי, לוו עלי וקדשו קדושת היום והאמינו בי ואני פורע" (ביצה טו:). וזאת בתנאי שלא יסמוך על הנס, אלא שיש לו עסק מסודר או משכורת קבועה, או חסכון שעליו הוא יכול להישען. שעליו אמרו חכמים שלא ידאג שמא לא יצליח להחזיר את חובו, כי אם יעבוד בחריצות ולא יבזבז את כספו על מותרות, ה' יברך את מעשה ידיו ויסייע בידו לשלם את חובו. אבל מי שאינו יודע כיצד יחזיר את חובו, לא יקח הלוואה לצורכי החג, שלא יהיה רשע שאינו משלם את חובותיו. וגם לא יפשוט ידו לקבל צדקה, אלא יאכל בחג מאכלים פשוטים, וכפי שאמר רבי עקיבא: "עשה שבתך חול ואל תצטרך לבריות" (פסחים קיב.). ובזכות שלא יזדקק לבריות – יתעשר (פאה ח:ט). אמנם עני שכבר נאלץ לפשוט ידו לקבל צדקה לצרכים שונים, ייטול צדקה כדי לשמוח בחג (משנה ברורה רמב:א).
If one finds himself with a temporary shortfall before a festival, it is appropriate for him to go into overdraft at the bank or to take out a loan, in order to enjoy the festival. He should not worry that something might go wrong and prevent him from repaying his debt. After all, God assured the Jews: “My children, borrow money on My behalf and sanctify the day; and believe in Me and I will repay” (Beitza 16b). This is on condition that one does not rely on a miracle, but rather has a stable business, regular income, or savings upon which he can draw. It is in such cases that the Sages say that one should not worry lest he be unable to repay the loan. As long as he works diligently and does not waste his money on luxuries, God will bless his efforts and help him pay off his debt. In contrast, one who does not know how he will repay a loan should not take one out to cover festival expenses, as people who borrow money and do not repay it are deemed wicked. He should not ask for charity either. Rather, he should eat simple foods on the festival, following R. Akiva’s dictum: “Turn Shabbat into a weekday rather than accepting charity” (Pesaḥim 112a). As a reward for not taking charity, he will become wealthy (Mishnah Pei’ah 8:9). In contrast, if one is already poor and must accept charity in any case, he should accept charity to cover festival expenses as well (MB 242:1).
It would seem that in practice, we basically follow Rabbi Aciva. Rabbi Yochanan's words are limited to people who have every natural reason to believe they will get ahold of the money. You still have to make room in your weekly budget for Shabbos. Just don't be more thrifty, or even as thrifty about Shabbos expenses than when we want to treat ourselves in other ways.