Perovskite-sensitized solar cells have reached power conversion efficiencies comparable to commercially available solar cells used for example in solar farms. In contrast to silicon solar cells, perovskite-sensitized solar cells can be made by solution processes from inexpensive materials. The power conversion efficiency of these cells depends substantially on the charge transfer at interfaces. Here we use Kelvin probe force microscopy to study the real-space cross-sectional distribution of the internal potential within high efficiency mesoscopic methylammonium lead tri-iodide solar cells. We show that the electric field is homogeneous through these devices, similar to that of a p-i-n type junction. On illumination under short-circuit conditions, holes accumulate in front of the hole-transport layer as a consequence of unbalanced charge transport in the device. After light illumination, we find that trapped charges remain inside the active device layers. Removing these traps and the unbalanced charge injection could enable further improvements in performance of perovskite-sensitized solar cells.