Problem with analog input

Yes. If you don't have a current limiting resistor (about 150 Ohms minimum) in series with the LED, you could be overloading the Arduino output and voltage regulator, which would affect analog input readings, as well as destroy the LED and/or the output pin.