Chemiosmosis is the movement of ions across a selectively permeable membrane, down their electrochemical gradient. More specifically, it relates to the generation of ATP by the movement of hydrogen ions across a membrane during cellular respiration or photosynthesis.