An ATM giving the wrong amount of money is possible but very unlikely.
Most ATM machines are maintained properly and often to ensure the correct amount of money is given to you when you withdraw cash from your account through the ATM machine.
I did have an ATM machine not dispense the correct amount of money to me and shorted me a $20.00 bill but I went into the bank and contacted them and they corrected the mistake.
They then promptly put the ATM machine out of order until they fixed it.
That's only happened to me once so ATM machines are pretty accurate.