The crew of the EasyJet Airbus A319, which was coming in to land at around 3,700 ft, only saw the drone at a late stage and said there was no time to take avoiding action, official reports show.
The UK Airprox (Aircraft Proximity) Board examined the near-accident on November 25, 2016, and rated it a “serious incident” - the highest risk rating.
The report comes as newly-released documents show pilots have encountered five separate drones over Edinburgh’s airspace since 2016 - more than anywhere else in the country.
A further incident was reported to the board over Dunbar in 2016, one of 11 such sightings from across Scotland over the past three years.
Four of those were given category ‘A’ status by the board, which is funded by the Civil Aviation Authority (CAA).
Drone sightings brought 36 hours of chaos to London Gatwick Airport before Christmas, with runways closed and 1,000 flights affected in what police described as a “deliberate act” of disruption.
Heathrow was also forced to ground flights after drone sightings in early January.
A spokesman for Edinburgh Airport said: “Drones pose a very real danger to aircraft – not just in the environs of the airport, but as they approach and depart.” He added: “The rules around usage are very clear and we’d urge all users to be responsible and ensure they stay within the law.”