I read on TV Tropes that:
The use of a banana peel as an injurious prop is actually alarmingly realistic and a reference to its ubiquity on the streets of American cities in the early part of the 20th Century. Refrigeration and shipping speed had combined to make bananas the most popular fruit in the country, and in that age before anti-littering laws, people would just eat the fruit and discard the peels wherever they were. As they rotted, the peels would become quite slippery and thus dangerous to tread upon.
(btw, is that true?), but I wonder: who used it first in a gag?