So what about your connections to ground and 5V? Directly from an analog input to ground or 5V, or by a big loop of wire? Or does it first pass through a shield and a protoboard? You might try putting a 0.001uF (1nF) capacitor from the analog input to ground.
The analog inputs already have 150nF capacitors on them, this wouldn't achieve anything.
The discrepancy in not reading 1023 is because, as has been mentioned, the ADC is
measuring w.r.t an accurate voltage reference, not the 5V rail. If you measure the
5V rail you should see its about 4.87V (give or take, the resistive divider uses 1%
The actual chip used, according to the schematic, is capable of reading 12 bits, not 10,
but I don't have a Galileo to check this.
(*) This does limit the bandwidth of the analog inputs, note.