Yes, The Hobbit IS an allegory. First of all, an allegory is when you use characters to represent an idea. The characters in The Hobbit represent the 50s and 60s. In the beginning of the story, Bilbo Baggins the hobbit was much like the 50s, disliking adventure. The dwarves were like the 60s, going on adventures. This book is written in the 30s, and it wasnt popular until the 60s, which shows how JRR Tolkien had his finger on the pulse.
No, Tolkien clearly stated that it was not an allegory. In one of his letters he comments:
"I dislike Allegory - the conscious and intentional allegory - yet any attempt to explain the purport of myth or fairytale must use allegorical language. (And, of course, the more 'life' a story has the more readily will it be susceptible of allegorical interpretations: while the better a deliberate allegory is made the more nearly will it be acceptable just as a story.) "