Which of the five sense was the first to evolve?
Taste and smell, the chemical receptors, because bacteria today largely function on chemical information.
Smell and taste were most likely the first primitive senses, though far more rudimentary and (probably) not associated with conscious thoughts.
Smell and taste aren't so much two separate senses as two sides of the same coin: both are chemical sensors or chemoreceptors, whether it is chemicals in the air or in the food.
Bacteria today use mainly chemicals to find things out about their environment, and billions of years ago when life was forming it probably wasn't so different. If life formed out of chemicals anyway, it's not so hard to assume that it started off using chemistry as its main tool.
The main problem with this question is that it's difficult to define where a sense begins and ends. Bacteria have no nervous system so we can't tell what they're really feeling. If a bacteria moves into an obstacle and has to go around, it could either be registering mechanically the obstruction, or simply moving in as close to a straight line as possible, though not able to move through the obstacle, the laws of physics dictate it will eventually just move around, since two things cannot occupy the same position in spacetime.