A useful roundup by Edwin Battistella at OUPblog:
Chess comes from the 6th century Sanskrit game chaturanga, which translates to “four arms.” The arms refer to the elephants, horses, chariots, and foot soldiers of the Indian army, which evolved into the modern bishops, knights, rooks, and pawns. The chaturanga pieces also included the king or rajah and the king’s counselor, which would later be reinvented as the queen. In chaturanga, the game ended when the rajah was removed from the board—when the king was killed.
Chaturanga was introduced to Persia around 600 AD and the rajah became the shah. Persian chatrang became Arabic shatranj and made its way to Morocco and Spain as shaterej. The word check, meaning an attack on the king, was adapted from the Persian shah. A player would say shah to announce an attack on the king. The expression checkmate came from the situation in which the king is attacked and has no defense: shāh māt means “the king is dead” and this connotation of regicide persists in the Russian name for chess: shakmati. [Sic: Should be shakhmaty.]
In Latin, the game was not named after the killing of the king, but after the attacks themselves—the checks. It was called ludis scaccorum (game of checks) or, when shortened [Sic: This is the Italian form], scacchi. The Latin word for check later gave us the Middle French eschec, which became échecs in the plural and chess in English.
There is much more on various chess terms from French and German; one thing I wish had been pointed out is that it is not just the chess sense of check that is from shah—the entire complex of English meanings comes from the chess term. See the Usage Note at the end of the AHD entry:
Through a complex development having to do with senses that evolved from the notion of checking the king, check came to mean something used to ensure accuracy or authenticity. One such means was a counterfoil, a part of a check, for example, retained by the issuer as documentation of a transaction. Check first meant “counterfoil” and then came to mean anything, such as a bill or bank draft, with a counterfoil—or eventually even without one.