At times this season, Ancelotti's job has come into sharp focus.
But Carvajal said at a media awards ceremony on Monday night: "In the end, in this world of football you go from heaven to hell in two weeks, with two defeats.
"I think that the manager should never be buried, you can see it throughout his professional career and how he has won two Champions Leagues with us in three years with people doubting him a lot and you have to value that, he is a fantastic coach."
On the impact of summer arrival Kylian Mbappe, Carvajal also said: "He is clearly a leader. He is one of the best players in the world, if not the best.
"He has fitted into the group from day one in a fantastic way, he is a fantastic lad and he is one of us, it seems like he has been here for 5 or 6 years."