The op-amp is powered from 5V, positive rail, and you are expecting a 2.5V input to be gained by exactly 2 to +5V. However, all op-amps can not have their outputs as high as the positive rail, although some can get very close. I'll bet that with an input voltage of 1.5V you do get a 2X gain and an output of 3.0V.
Temporally, try powering the op-amp at 8 to 10V. The output should now be the 5V you expect. Just don't over-voltage the input to your processor.
Look at the Output Voltage Swing specs in the op-amp's data sheet.
The LM741 is a very old op-amp. There are many newer much better op-amps now available.