Mr. Chuckey answered it in best mathematical way.
BTW, u ca read on op-amps from Linear IC's - by ramakant gayakwad. This book is good for beginners and explains all basics of op-amps in sweet, simple and short way. Then can go for more advanced books.
here is brief, an ideal op amp should have infinite bandwidth and infinite input impedance. It means it should work for any frequency i.e. 1Mhz or 1GHz, the output gain will be constant. The open loop gain is infinite. 0 output impedance. 0 offset voltage and current. 0 bias current. infinite CMRR.
but, in reality, op-amps have limited bandwidth, high imput impedance, low output impedance, high open loop gain. ANd the gain is dependant on what frequency are u operating. Gain is inversely proportional to frequency bandwidth. so, frequency increases, so is the gain decreases. But if freq is constant, maximum attainable gain is consta too which is found from GBP.
hope that helps.