It really all comes down to how we define trilogy. Based on the Random House Dictionary, dictionary.com defines trilogy as
a series or group of three plays, novels, operas, etc., that, although individually complete, are closely related in theme, sequence, or the like.
Notice the phrase, individually complete. This is the key. In a proper trilogy each of the individual parts (or in the case of LotR, volumes) can stand alone as a complete work. Of course, knowing the other two parts would enhance your understanding of the story, but it's not absolutely necessary. A great example of such would be the Star Wars or Dark Knight trilogies. The Lord of the Rings books are much different though. It was originally written and intended to be one complete work until the winter of 1952-53 when the publishers decided to separate it into three volumes due to post-war paper shortages (Letters No. 136). Tolkien never tried to tie some conclusions at the end of FotR or TT to make them "individually complete". Each volume is and can only be part of a larger story. Tolkien himself made this distinction in a letter to his US publishers (Houghton Mifflin Co.):
The book is not of course a 'trilogy'. That and the titles of the volumes was a fudge thought necessary for publication, owing to length and cost. There is no real division into 3, nor is any one part intelligible alone. The story was conceived and written as a whole and the only natural divisions are the 'books' I-VI.
(Letters No. 165)
Most critics and the public didn't know this so when The Fellowship of the Ring was first published in 1954 complaints started being made about the 'shapelessness' in Volume I. Tolkien noticed the responses and took time to address the issue in a letter sent to Rayner Unwin, the son of his publisher:
The (unavoidable) disadvantage of issuing in three parts has been shown in the 'shapelessness' that several readers have found, since that is true if one volume is supposed to stand alone. 'Trilogy', which is not really accurate, is partly to blame.
(Letters No. 149)
Based on these letters I think we can conclude that The Lord of the Rings books do not form a trilogy. It is one work that has been divided into 3 parts (or technically six since each volume is abruptly divided into two halves).
It is often times a very blurry topic, one without clear rules or guidelines. In the case of the books I think Tolkien made it very clear that each part of The Lord of the Rings forms one story. Even so, I won't be so careful with the films. Some of them are more unified while others have stiff cliffhangers. Besides, "trilogy" is a much snappier marketing line. Come December we can drop this whole topic anyway and just call all six of them a hexology or something. :-)