Regarding Lord Hanuman's special powers namely Anima & Garima, Goswami Tulsidas in his Hanuman Chalisa says 'Ashta Siddhi Nava Nidhi ke Daata; Asa bara deena Janaki Maata' (verse 30) meaning Hanuman got these powers from Seeta Maata whereas in Valmiki Ramayan (VR) it is said that He got these powers from Surya Bhagavan. Which is correct ?
As your question is related with Anima (able to reduce size upto atom) and Garima (able to increase size as will). Even in Ramcharitmanas Hanuman already had Anima and Laghima siddhis:
In the SundarKanda 9th Doha there is a story with Hanuman and Surasha.
जस जस सुरषा बदनु बढावा ।
तासु दुन कपि रुप दिखावा
As Surasha began to increase her body, Hanuman began to increase his body size twice.
So this shows he already had Garima siddhi:
सोलह जोजन मुख तेहिं ठयहु ।
तुरत पवन सुत बत्तिस भयहुॅ ।।
As (Surasha made) her body of 16 Yojanas. Hanuman quickly made his body of 32 Yojanas.
So this clearly shows he already had Garima siddhi.
Also in the same event:
सत जोजन ताहिं आनन किन्हा ।
अति लघु रुप पवनसुत लिन्हा ।।
As she made her body of 100 Yojanas, the Son of Wind-God made his body very very small.
Thus from above it is clear that Hanuman also had Anima Siddhi before meeting Sita.
So, he already had Anima and Garima siddhi before meeting Sita. He also makes his body size small while entering Lanka. He received those two Siddhis from Suryadeva. Upto this there is no contradiction in Tulsidas sayings and Valmiki Ramayana.
What about that verse of Hanuman Chalisa ? Tulsidas is referring to that event of Sundar Kanda where Sita blesses Hanuman for Immortality, Siddhis and Ram-Bhakt in 16th Doha of SundarKanda.
आसिष दिन्ही राम प्रिय जाना ।
होहु तात बलशिल निधाना ।।
अजर अमर गुण निधि सुत होहु ।
करत बहुत रघुनायक छोहुॅ ।।
करहु कृपा प्रभु अस सुनी काना ।
निर्भर प्रेम मगन हनुमाना ।।
Recognizing him as the beloved of Rama She gave him Her blessing: May you become a repository of strength and Nidhis, dear son. May you ever remain immune from old age and death and prove to be a storehouse of good qualities, and my son; and may the Lord of the Raghus shower His abundant grace on you. The moment the words May the Lord be gracious to you reached his ears Hanuman was utterly overwhelmed with emotion.
So Tulsidas in that verse of Hanuman Chalisa is referring to this event. But this event differs from Valmiki Ramayana. In Valmiki Ramayana Lord Rama blesses him to be immortal. But here Hanuman is blessed by Sita. This may be due to Kalpabheda( difference of Kalpa causing different in event). Or you can take story as per your Understandings.