The error itself is a generic message. Google will quickly confirm that. The error is exactly what it says, avrdude (the program that does the actually programming) wasn't able to talk to the programmer (the bootloader on the Uno.)
Did this error start after you were already doing something else with serial? Sometimes it is possible for the ATmega328 and the 8u2 (serial to usb converter on the Uno) to get screwed up when serial data is sent too soon.
First, try manually RESETing the board (with the push button) when uploading code. Press the button 1-2 seconds after the "Sketch Size" message appears.
If that doesn't work, then try disconnecting the board from power. Press and hold RESET. Connect to power while holding reset. Then release RESET 1-2 after the "Sketch Size" message appears.
The idea behind the 2nd method is that it holds the ATmega328 in RESET so that it never sends anything to the 8U2. This gives the 8U2 a chance to start the re-programming process.