Alonso did get marginally beaten by Hamilton but Hamilton is one of the best drivers in F1 also, personally I think he's better than Alonso but it's pretty damn close either way.
The were matched on points.
Hamilton was ahead on countback (race wins).
Lets not forget, that this was the year when Alonso was no longer speaking to management. He was being marginlised to such an extent that he complained to the FIA that he felt McLaren would sabotage his title chase. FIA then placed an FIA official in Alonso's garage to ensure there was no funny business.
In Hungary, when Alonso qualified on pole (and would probably have gone on to win the race), he was penalised 5-6 places. Why? Because he allegedly held up his team-mate in qualifying, in the garage. This, I believe is unprecedented - perhaps someone can correct me if I am wrong - where the FIA penalise 1 driver for blocking
his own team-mate in the pits, during qualifying. Had Alonso "played the game", he'd have won the title. As he was young at the time, he had no idea how to play the political game and lost the title by 1 point.
In 2010, when he joined Ferrari, he learned how to play the political game and immediately ensured that he was the No.1 driver and Massa was No.2. He managed to win the political game within 3-5 races of joining the team and Massa knew the score.
An F1 driver is not rated on outright speed only, but a whole bunch of other attributes which can help him win the title.
MSc, Prost (and now) Alonso are all top players in the political arena. Hamilton is fast, but that's all he has going for him. He lacks intelligence and this will hold him back if he ever raced against a top driver like Senna, Prost, Alonso or MSC (1st career).
For those doubting Vettel - you don't win 4 titles in a row, with a whole bunch of records/stats by being average or above average. I rate Vettel only behind Alonso and Hamilton. Why was Vettel perform so poorly this year? I dont think even he knows.
Ricciardo is a bit of a wild card. He has had 1 great season. He has defeated Vettel comfortably. If he could do this 3 seasons in a row, it would be difficult to argue against him being a top line driver.
So, who do I rate as the top drivers (in order):
Alonso (super consistent, always beats his team-mate and has humiliated Kimi, who many rated highly before 2014. Give Alonso the fastest car and he will win the title)
Vettel (4 time WDC, multiple records, including winning 9 races in a row which is unbelievable. Give him the fastest car in F1 and he will win the title)
Hamilton (F1's fastest driver over a single lap, but is emotionally unstable and as we saw in 2012, wont necessarily deliver a title win, even in the fastest car).