This poetic hymn contains the name of the author from the first letters of each stanza שלמה הלוי.
The source for this concept comes from the story (Shabbos 119a) that Rabbi Chaninah would go out to the west at the beginning of Shabbos to greet the Shabbos Queen שבת מלכתא. Rashi comments that this is like receiving the face of the King.
And in the same Gemara, Rabbi Yanai would dress in special clothes at the beginning of Shabbos and said באי כלה, באי כלה. Possibly the word כלה indicates the feeling towards Shabbos of love and delight, similar to the feelings toward one’s Kallah, to whom everyone praises. (Rabbi Yanai often would use flowery language).
The repetition of the words באי כלה, באי כלה indicates the extra affection towards Shabbos (like when Avrohom was called twice by HaShem, or Yaacov or Moshe, etc.)
It is possible to further explain that Rabbi Chaninah (who called Shabbos the Queen) and Rabbi Yanai (who called Shabbos a Kallah) disagreed regarding the matter of adding on to Shabbos (תוספת שבת). Is the law of adding from the weekday to the holy a concept from the Torah or just from the Rabbis (as explained in the Bais Yosef Or. Ch. 261)? Rabbi Chaninah believes the addition to the Shabbos is from the Torah, and thus, he calls the time period on Erev Shabbos close to the actual Shabbos, the Queen, since from the Torah this period of time is eligible to be an actual part of Shabbos.
Whereas, Rabbi Yanai holds that the period on Erev Shabbos close to the actual Shabbos is eligible for Shabbos only according to Rabbinical decree, and he therefore calls is a Kallah, alluding to the time period prior to the actual Chupah (when she is not yet an actual spouse).
Apparently the author of this liturgical hymn wished to comply with both opinions. At first he calls this time-period Kallah and in the final refrain he refers to the time-period as the Shabbos Queen. Thus, he fulfills the Talmudic concept (Berachos 39b) that a Yirei Shamayim attempts to fulfill both opinions.
In addition, in an Aggadic method one can explain the name of Kallah as applied to Shabbos. Shabbos is a concept of completion of the Creation and of all the needs of people. It is known from the end of Parsha Shoftim, the usual order of the life of people. First, a person builds a house, and afterwards one plants a vineyard, after that one marries. Similarly, after all the matters of Creation, Shabbos came and completed the Creation, thus, a Kallah also comes after the establishment of the other foundations of a person’s life.
Regarding the concept of whether “Tosefes Shabbos” (adding time onto Shabbos) is from the Torah, Rabbi Epstein wonders why no one mentions the extra word "את" (in many verses connected with Shabbos). This word implies something connected with Shabbos that would be possible to become connected, like the time period prior to the beginning of Shabbos.
Further, Rabbi Epstein suggests another source from the Torah. For the seventh day of Creation, the Torah does not say “It was evening and it was morning the seventh day”, like the Torah does say concerning the other 6 days of Creation. Possibly, if the Torah had said such language then Shabbos could only begin at the exact time that day six ended. Thus, the failure to say such language allows for the concept that the seventh day can also include a portion of the sixth day.
