The gnome sort algorithm sorts a list by finding the first pair of adjacent elements in the wrong order and swapping them, moving forward until no swaps are needed. It compares each element to the one before it, swapping and moving backward if out of order, or moving forward if in order. This continues until the list is fully sorted with no out of order pairs remaining. The algorithm runs through an example list step-by-step to demonstrate how it works.