As others have said, it's an expression used when the other person has arrived very late. It's similar to English "it's about time!".
If the construction confuses you, I'd like to point out that "vaya" here isn't really a form of the verb "ir" 'to go', but rather it's closer to being an interjection meaning "whoa". If it helps, I would literally translate the expression as "whoa, what an hour for you to come!" (but note there's no pause in Spanish after "vaya", and "horas" is really in the plural).