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 Surasa began to increase her body, Hanuman began to increase his body size twice.
So this shows he already had Garima siddhi:
सोरह जोजन मुख तेहिं ठयऊ ।
तुरत पवनसुत बत्तिस भयऊ॥
As (Surasa 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.
आसिष दीन्हि रामप्रिय जाना।
होहु तात बल सील निधाना॥
अजर अमर गुन निधि सुत होहू।
करहुँ बहुत रघुनायक छोहू॥
करहुँ कृपा प्रभु अस सुनि काना।
निर्भर प्रेम मगन हनुमाना॥
Recognising 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.