It means "Wow." or like 'so close.' If you kick a football and miss the net, you might say it. It either means "wow, this is great" or an expression of disappointment like "ah come on! really?". In this case, it the dissapointment from being so close to achieving something, only to have it not occur.