I'm looking for a comprehensive book on differential geometry that starts from the very basics and preferably with an analytic flavor. What can you recommend?
I would recommend the book Introduction to Smooth Manifolds by John M. Lee. It starts from the very basics but treats it in a very formal manner. It is basically about differential topology, so if you want to learn more about curvature and things like that, you could consider having a look at Riemannian Manifolds, also by Lee. But from your background, you should start with smooth manifolds.
Maybe some words why I would choose those books (or the series of the three books including Introduction to Topological Manifolds): Lee has a manner of writing, which I've not encountered a lot in current books. It is formal, but never seems hopelessly abstract and confusing, since he brings it down to earth with example, or in manifold theory important, calculation in coordinates. I have been working with those three books for a year now, and I think it was a very good decision. It is self contained, through the various revisions in the appendices and it has a lot of exercises in it. But I think, what matters most in such a field, the notation is almost perfect. So clear.
I personally learned differential geometry from the trio of John Lee (Introduction to Smooth Manifolds), Loring W. Tu (An Introduction to Manifolds), and Barrett O'Neill (Semi-Riemannian Geometry with Applications to Relativity).
Tu is the most elementary, and undergrad-friendly, but not as comprehensive. Lee is much more comprehensive, but a little bit more advanced. However, both of these texts are really about "differential topology" rather than differential geometry. Not that this is a bad thing; you need to know the basics of differential topology before you start talking about connections and differential operators.
O'Neill is great since you mentioned that you wanted an "analytic flavour". He gets you up to speed very quickly on the basics of smooth manifolds so that you can start doing analysis. Affine connections, and differential operators on Riemannian manifolds (divergence, Laplacian, etc.) are introduced starting on page 59. However, O'Neill obviously isn't as comprehensive with regards to the basic differential topology. I would recommend keeping Lee or Tu on hand as well to fill in the gaps later.
Another unconventional introduction would be Differential geometry: Cartan's generalization of Klein's Erlangen program by R. W. Sharpe. This is a beautiful text that focuses on the central role of symmetry in differential geometry. It gives you a very broad perspective on differential geometry, subsuming various subfields such as semi-Riemannian geometry, projective geometry, conformal geometry, CR geometry etc. within the framework of Cartan geometry. As with O'Neill, the introductory aspects of differential topology are brief and it would be good to supplement the first chapter with Lee and or Tu.
Although this last one I will mention is not by any means an introduction, but it focuses on differential operators, and is my personal favourite differential geometry text, and my go-to reference: Natural operations in differential geometry by Kolar, Michor, and Slovak. It might be a good sequel once you have a good grasp of the theory, and want to learn about differential operators from the jet bundle point of view.