We know that near a massive object, light's wavelength and frequency changes, but its speed remains same. I'd like to know how it is possible for frequency to change, unless we change the light source?
Frequency is the number of wave fronts passing in a period of time.
Time dilation due to the effects of gravity must therefore result in frequency changes.
See for example: Wikipedia
The simple answer is that the frequency of the light does not change, what changes is our perception (or measurement) of it.
To better understand this, let me use the example of the "receding galaxies." The frequency spectrum of hydrogen light is known, but when the same light, emitted from a receding galaxy, is compared to the "local" spectrum, the light is "red shifted." Because of our relative motion, the wave fronts take longer to arrive, so we perceive it as a decrease in frequency. In the opposite case, the galaxies are getting closer to each other so the wave fronts arrive sooner and we perceive this as an increase in frequency.
Like wise, because gravity causes time to "slow down," there will be more wave fronts for a given time span. In the case of the above referenced light, we will perceive this as an increase in frequency.