There is an ATM located in Machu Picchu Pueblo (incorrectly known as Aguas Calientes for its thermal baths located there). The ATM was opened in July of 2006. There is a surcharge on transactions made at the Machu Picchu Pueblo ATM. It is located right next to Toto's House restaurant on the tracks.
When we were there in 2001, there was no ATM or bank so we couldn't get more money until we returned to Cusco. So be forewarned: if you hike to Machu Picchu and plan on spending the night in AC, bring some money with you. It may be different now but I wouldn't take the chance unless you can get confirmation that there is a bank or ATM there.