If an Asteroid, the size of the one that killed off the dinosaurs , passed by very close to the Earth but still remained outside of Earth's atmosphere, would it cause any damage ?
An asteroid that remains outside Earth's atmosphere, and therefore does not impact Earth, will have no effect on the planet.
Asteroids, even biggish ones like the dinosaur killer, are pretty small compared to the Earth. They do not have enough mass to graviationally affect earth's orbit noticeably. And if they miss earth, the pass quickly.
The concern would be that if an asteroid can pass close to Earth, that it may collide in a future orbit. The asteroid's path will be changed by the earth's gravity. However, a very close encounter will enable astronomers to get a very high quality position on the rock, and so be able to predict its future path with very great accuracy.
Comet tails aren't a worry. We passed through Halley's tail in 1910, the effect on the Earth was precisely nothing. ☄