The words melave malke mean "accompanying the queen." Partaking of this extra meal after the Sabbath is a way of bidding farewell to the Sabbath Queen.
According to legend, the custom has its origin with King David. David asked G-d when he would die, and G-d told him it would happen on a Saturday. From that time on, when each Sabbath was over, David made a party to celebrate his survival. The nation at large rejoiced with him and adopted the practice of celebrating on Saturday night.
Source: Kolatch, Alfred J. The Jewish Book of Why/The Second Jewish Book of Why. NY: Jonathan David Publishers, 1989.