Sir Paul McCartney, Ringo Starr and the families of George Harrison and John Lennon control the Apple Corps label.
They claimed the US firm broke a deal aimed at ensuring there would not be two Apples in the music industry.
But Mr Justice Anthony Mann ruled that the computer company used the Apple logo in association with its store, not the music, and so was not in breach.
The ruling means iPods and iTunes will still be able to carry the Apple name and logo.
“With great respect to the trial judge, we consider he has reached the wrong conclusion”
The Beatles' label, which wanted London's High Court to award damages and stop its rival using the Apple logo in its music operations, will appeal.
Mr Justice Mann ruled iTunes was "a form of electronic shop" and not involved in creating music.
"I conclude that the use of the apple logo ... does not suggest a relevant connection with the creative work," he wrote in his judgment.
"I think that the use of the apple logo is a fair and reasonable use of the mark in connection with the service, which does not go further and unfairly or unreasonably suggest an additional association with the creative works themselves."
Apple Corps must pay its rival's legal bill, estimated at £2m, but the judge refused an interim payment of £1.5m pending further hearings.
The record label said the rise of iTunes broke an agreement the two sides hammered out in 1991 after their last dispute.
That deal gave the record label exclusive rights to use the apple trademark for the record business, Geoffrey Vos QC, representing Apple Corps, told the court.
Apple Computer, whose products helped launch the personal computer industry, was founded in 1976 and its logo is an apple with a section removed from the side.
“We have always loved The Beatles, and hopefully we can now work together to get them on the iTunes Music Store”
Apple Corps was set up by The Beatles in 1968 and is represented by a complete green Granny Smith apple.
Apple Corps manager Neil Aspinall said: "With great respect to the trial judge, we consider he has reached the wrong conclusion.
"We felt that during the course of the trial we clearly demonstrated just how extensively Apple Computer had broken the agreement.
"We will accordingly be filing an appeal and putting the case again to the Court of Appeal."
Apple Computer chief executive Steve Jobs said: "We are glad to put this disagreement behind us.
"We have always loved The Beatles, and hopefully we can now work together to get them on the iTunes Music Store."
The launch of the iPod, a portable digital music player, in 2001, and its iTunes music store two years later, prompted the latest battle.
About three million songs are downloaded from the service every day.
Tracks by The Beatles have not been licensed for downloading and are not available on the service.
Mr Vos demonstrated how to use iTunes during the hearing - downloading Chic's 1978 disco hit Le Freak in the courtroom.
He pointed out to Mr Justice Mann how many times the Apple logo appeared on the computer screen as he went through the process.