My father was completely bald by the time he turned 40.
Literal
Father [topic-は] 40-years-old [into-に] become [by-までに] completely had-gone-bald.
~までに sets a deadline: 'by the time he reached 40.' 完全に = 'completely.' はげていた uses ていた for a resulting past state — he was in the state of being bald. A vivid, memorable example sentence.