Meteor traveling through atmosphere without hitting Earth Is it possible (however unlikely) to have a meteorite miss Earth so narrowly and at such flat angle that it would enter atmosphere, travel few (dozens, hundreds, thousands?) kilometers getting as close as few kilometers to the ground without hitting anything and then leave atmosphere without any significant, leaving millions of humans staring agape at the sky?

Or does gravity and air friction prevent this by either making such flat trajectory impossible or by slowing down meteorite enough to make it fall to the ground?
yes it is possible,they are called Earth grazers or Earth-grazing fireball.
they are not rare but only few incidents are recorded.

for more details read this Wikipedia page https://en.wikipedia.org/wiki/Earth-grazing_fireball