A lapse is a temporary slip, failure or break in continuity. Eating a second helping of cake when you're otherwise doing well on your diet is a lapse. Eating the whole cake in one sitting is a serious lapse in judgment.
First used to imply a “slip of the memory,” the noun lapse evolved in the sixteenth century from the Latin lapsus, meaning “a slipping and falling, falling into error.” The connotation of “a moral slip” developed later, and the verb form came into existence even later than that. Behaving badly one day when you're usually on your best behavior is a lapse; Behaving badly again after a short stint being well-mannered means you're lapsing back into nasty old habits.