Cant is jargon or trite commentary, or singsong speech. A chant is a type of song. Is there a connection between the words? Yes, and many other words are more or less obviously related.
They are both derived from the Latin verb canare, which means “sing.” Cant originally referred to the repetitive, practiced patter of beggars seeking attention (and alms) and, by extension, came to pertain to the jargon of the underworld and then to terminology promulgated by anyone one opposes or holds in contempt.
Cant is also an unrelated term from Latin (possibly by way of an earlier Celtic word) meaning “angle” or “slope”; this is the source of canton (meaning “corner” and used in reference to regions, as in the divisions of Switzerland) and possibly cantilever, which refers to a projecting structural element anchored only at one end.
Chant is a noun referring to a simple, repetitive form of singing and, by extension, rhythmic repetitive speaking, often spoken loudly and in groups, as in a protest or at an athletic competition; it is also a verb describing such performances. A chanter is one who chants; the feminine French form, chanteuse, was adopted into English to refer to a female singer, especially a nightclub entertainer. The variant cantor, from the Latin word referring to a vocal performer, is now used primarily to an official singer and prayer leader in a Jewish religious ceremony or service; precentor (“singer before”) is an equivalent term for a choirmaster in some other religious traditions.
Other related terms include canto, an Italian word for song that now usually pertains to a section of a long poem; “bel canto” (in Italian, literally “beautiful singing”), a form of opera; cantata, which refers to a song, often religious in character, with voice and instruments and sung in several parts; canticle, meaning “little song” (with the same diminutive ending element as, for example, article and particle) and referring to a hymn; and canzone (Italian for “singing” or “song”), a word for a medieval sung poem. Descant, with a prefix that means “apart,” refers to a high melody sung distinct from the main melody of a song.
Additional words include chanson, which is from an Old French word for “song” and refers to a cabaret-style song; chantey (with the variations chanty and shanty)—likely from chantez, the imperative form of chanter, a French word that means “song”—which refers to a sailor’s work song; and chanticleer, which derives from the character of a rooster in medieval verse narratives.
Also descended from canere, we have recant, which means “renounce an opinion” and stems from requiring heretics to disavow their beliefs by chanting the renunciation. An incantation, meanwhile, is a chanted spell or other vocalization as part of a ritual, and enchantment, which originally pertained to being subject to a magic spell, by extension came to mean “charmed by beauty or another quality”; an enchantress is a woman who has this effect on others. (Charm itself, which pertains to the action of charming or to the quality of charm or to a magic amulet, is indirectly related as well.)
More obscure relatives include accent, which refers to a particular pronunciation or emphasis, and incentive, which originally applied to that which stirs one’s mind or soul but in the mid-twentieth century acquired the mundane sense of “something that motivates.”