Middle English sabat, from Old English sabat "seventh day of the week in the Jewish calendar; Saturday" as observed by the Jews as a day of rest from secular employment and of religious observance, from Old French sabat and directly from Latin sabbatum, from Greek sabbaton, from Hebrew shabbath, properly "day of rest," from shabath "he rested" (from labor). The spelling with -th is attested from late 14c. but was not widespread until 16c.
The Babylonians regarded seventh days as unlucky, and avoided certain activities on them; the Jewish observance might have begun as a similar custom. Among European Christians, the time of "Sabbath" shifted from the seventh day to the first (Sunday) via the Christians' celebration of the Lord's resurrection on the first day of the week (a Christian Sabbath) "though no definite law, either divine or ecclesiastical, directed the change" [Century Dictionary], but elaborate justifications have been made. In English Sabbath as "Sunday" is evident by early 15c. The sense change was completed among the English people generally during the Reformation.
The original use of the word is preserved in Spanish Sabado, Italian Sabato, and other languages' names for "Saturday." Hungarian szombat, Rumanian simbata, French samedi, German Samstag "Saturday" are from Vulgar Latin *sambatum, from Greek *sambaton, a vulgar nasalized variant of sabbaton. Gothic Sabbato, Sabbatus probably are directly from Greek.
The meaning "any day (or month or year) in which religious rest is enjoined" is by late 14c.; the word also was used in Medieval Latin of any feast day, the solstice, etc. Sabbath-breaking "act of profaning the Sabbath" is attested from 1650s (to break the Sabbath is from late 14c.), formerly a legal violation in parts of the old U.S., "immoral, disturbing, or unnecessary labors or practices" [Century Dictionary]. Sabbath-school is by 1798.