Barcelona has grown for the better compared to the previous season, but you shouldn't assume Real Madrid ran out of gas before reaching the finish line. Ancelotti is very ambitious to defend the La Liga title, he has a good squad to give competition to Barcelona.
Barcelona are better than themselves in the last season but they are not better than Real Madrid. We have to wait till season ending to say it, for now it is too soon to conclude. Personally Barcelona and Real Madrid are not different in quality and if I choose a better team, I choose Real Madrid, not Barcelona.
Of course Barcelona have good future with their young players but now they are not better than Real Madrid which have better combination of young and old players. Carlo Ancelotti is a more experienced and better coach than Xavi.
Yes, of course, this is still the middle of the season, so it is possible on the field for both Barcelona and Real Madrid teams to happen, the difference is only three points in the top three of the standings and all of them have ambitions to be at the top of the standings.
Even though Xavi is still somewhat inexperienced in your eyes, so far he has managed to keep Barcelona at the top of the standings and Carlo Ancelotti always misses the chance of one step at the top of the standings.
I think you judge the abilities of both of them not well, in fact, from my point of view, they are almost equal in terms of their abilities, but Ancelotti indeed actually got more experience.