Barliman appears to have had a rather bad memory, "One thing drives out another" he says. He forgot to send Gandalf's letter to Frodo, leaving Frodo uncertain as to Gandalf's fate and causing him to start his journey much later than the letter indicated. He did not remember it until Frodo and his companions arrived to stay at the inn, and even then it was long before the connection was made. He did, however, remember in time to produce Strider's credentials.
Portrayal in Adaptations
In Peter Jackson's The Fellowship of the Ring, he is played by David Weatherley, although the character is not named and most of his scenes from the book (including the reference to Gandalf's letter) are not in the film.