The train was almost an hour late.

Literal

Train [topic-は] almost 1-hour was-late.

ほとんど ('almost, nearly, mostly') functions as an adverb, marking approximation. Paired with a quantity ('almost one hour'), it indicates 'close to but not quite reaching.' Different from 約 (approximately, in either direction).