We develop a systematic method for renormalizing the AdS/CFT prescription for
computing correlation functions. This involves regularizing the bulk on-shell
supergravity action in a covariant way, computing all divergences, adding
counterterms to cancel them and then removing the regulator. We explicitly work
out the case of pure gravity up to six dimensions and of gravity coupled to
scalars. The method can also be viewed as providing a holographic
reconstruction of the bulk spacetime metric and of bulk fields on this
spacetime, out of conformal field theory data. Knowing which sources are turned
on is sufficient in order to obtain an asymptotic expansion of the bulk metric
and of bulk fields near the boundary to high enough order so that all infrared
divergences of the on-shell action are obtained. To continue the holographic
reconstruction of the bulk fields one needs new CFT data: the expectation value
of the dual operator. In particular, in order to obtain the bulk metric one
needs to know the expectation value of stress-energy tensor of the boundary
theory. We provide completely explicit formulae for the holographic
stress-energy tensors up to six dimensions. We show that both the gravitational
and matter conformal anomalies of the boundary theory are correctly reproduced.
We also obtain the conformal transformation properties of the boundary
stress-energy tensors