Bana Alabed, who posted to more than 300,000 followers from the warzone with the help of her mother Fatemah, fled the city with her family after an evacuation deal was brokered by Russia — the main supporter of Syrian President Bashar al-Assad — and Turkey, which backs some large rebel groups.
In a post on Twitter, Mr Erdogan said he had hosted Bana and her family at the presidential palace in Ankara.
He also shared photos showing him hugging Bana as she sat on his knee.
Bana posted about her visit, saying she was happy to meet the President.
After being evacuated, Bana told reporters about her ordeal, saying her home in Aleppo had been bombed.
"Our home was bombed. We came out from the rubble safely, thank God," she said.
"We left to another place, we suffered a lot because of the shelling in Aleppo. We suffered a lot, a lot."
The family then moved to the Sukari district, where their house was also bombed.
"My dad got injured that time. We moved to another house and then we came here," Bana said.
"We didn't eat or do anything. I saw bombing everywhere. We saw the fighter jets in the sky too."
Bana has said she hopes to one day return home and has made a plea to her followers to help the children of Aleppo.
Thousands of people have been evacuated from Aleppo under a ceasefire deal that ends fighting in the city.