The child was taken to hospital for assessment.
The fire came after reports of a disturbance, with a man seen holding a knife and acting in a threatening manner outside the building in Durar Drive in the west of the city.
Police said a man had been detained in relation to the incident, which happened just before 11.30am on Wednesday.
Officers have also urged those with information to come forward.
Inspector Euan Smith said: “The incident happened shortly before 11.30am when a member of the public reported seeing a man in possession of a knife and acting in a threatening manner.
“Local officers quickly attended the address and upon arrival discovered that a fire had taken hold within.
“A man was subsequently removed from the block of flats and taken into police custody while firefighters evacuated the area and extinguished the flames.
“A total of 12 people sustained smoke inhalation including a child who was taken to the Royal Infirmary of Edinburgh for assessment.
“Our inquiries into this incident are ongoing and I would urge anyone who has information or who witnessed any unusual behaviour in the Durar Drive area to contact police immediately.”