unable to read ir sensor value

You can't possibly get readings up to 1027!!

The Arduino ADC (analog to digital converter) is 10 bit resolution.

That means that the maximum value is 2^10-1 = 1023, corresponding to the max voltage (which is 5V unless you have set the reference to something else)

The high readings you're getting could be because the pullup resistor you're using is fairly high. 47K is quite a bit. I'm using 10K in a similar circuit.

Have you tried placing a white surface in front of the sensor. This should make the readings drop if the circuit is set up right.