ようやく has the following definitions in romajidesu:
(adv) finally; at last
"Well, OK," Willie finally agreed.
barely; narrowly; hardly; only just
I barely made the 9:20 train.
gradually; little by little; by degrees
I'm wondering, when is the last definition relevant?
For example, consider the following sentence:
Should I read it as "he finally understood what he had to do" or "he gradually understood what he had to do"?