Here's my take on it, based on the pesukim and this Gemara as well as some other Midrashim.
First of all, the nesiim gave three sets of gifts to the Mishkan:
- the gemstones, oil, and spices in Vayakhel
- the wagons in Naso
- the offerings for the Chanukas Hamizbeiach, also in Naso immediately after (2).
Rashi, based on the Midrash, explains the progression from (1) to (2).
אָמַר רַבִּי נָתָן מָה רָאוּ הַנְּשִׂיאִים לְהִתְנַדֵּב כָּאן בַּתְּחִלָּה, וּבִמְלֶאכֶת הַמִּשְׁכָּן לֹא הִתְנַדְּבוּ תְּחִלָּה? אֶלָּא כָּךְ אָמְרוּ הַנְּשִׂיאִים, יִתְנַדְּבוּ צִבּוּר מַה שֶּׁיִּתְנַדְּבוּ, וּמַה שֶּׁמְּחַסְּרִין, אָנוּ מַשְׁלִימִין, כֵּיוָן שֶׁרָאוּ שֶׁהִשְׁלִימוּ צִבּוּר אֶת הַכֹּל, שֶׁנֶּאֱמַר "וְהַמְּלָאכָה הָיְתָה דַיָּם" (שמות ל"ו), אָמְרוּ מֵעַתָּה מַה לָּנוּ לַעֲשׂוֹת? הֵבִיאוּ אַבְנֵי הַשֹּׁהַם וְהַמִּלּוּאִים לָאֵפוֹד וְלַחֹשֶׁן, לְכָךְ הִתְנַדְּבוּ כָּאן תְּחִלָּה
Rabbi Nathan said: What reason had the princes to give their contributions here first of all the people, whereas at the work of the Tabernacle they were not the first but the last to contribute? But — he replied — the princes spoke thus: “Let the community in general contribute all they wish to give and then what will then be lacking we shall supply”. As soon as they saw that the community gave everything needed in its entirety (lit., that the community completed everything) — as it said, (Exodus 36:7) “For the stuff they had was enough [for all the work to make it]” — the princes asked, ‘What can we now do’? Therefore they brought the onyx stones, and stones for setting for the Ephod and for the breast plate. That is why they were here the first to contribute”
(copied from Sefaria)
This explanation is really odd. It's not like the nesiim didn't have anything left to contribute, and therefore they learned their lesson and came first next time. The stones, oil, and spices are an important part of the Mishkan's operation, and the stones are an especially prominent and unique gift. What more could they have wanted?
Also note that nobody explains the progression from (2) to (3). It seems that when the brought the wagons, they hadn't yet planned to give the Chanukas Hamizbeiach. Rashi touches on this point but doesn't give an explanation.
Apparently, the Nesiim wanted to contribute to the construction of the vessels of the Mishkan, like the Aron and Mizbeiach. (And it's hard to blame them - if I could donate to any part of the Mishkan, I'd probably pick the Aron.) They initially failed to do this, because all of the materials had already been donated.
The wagons were an attempt to give a unique service and honor to the vessels. The wagons as described in the Gemara barely fit the mishkan, but had plenty of room to fit the vessels, which were smaller, with small parts of the copper mizbeiach hanging off the sides. The 6 wagons would have held the aron, shulchan, menorah, two mizbeichos, and kiyor.
But their plan failed - the vessels have to be carried on the shoulders of the Bnei Kehas, not on wagons. The Nesiim still wanted to contribute to the vessels, so they came up with Plan C, to donate the Chanukas Hamizbeiach. This reads very nicely in the pesukim: Moshe didn't give the wagons to the Bnei Kehas, and then the Nesiim brought the Chanukas Hamizbeiach.
A weak point in my theory is that I'm considering the shemen hamishchah's use on the vessels as part of the Mishkan's "operations" and the Chanukas Hamizbeiach as part of the "construction", when their functions are very similar on the surface. I can think of reasons why this would be the case, but I could have easily seen it the other way as well.