She failed every time she tried.

Literal

[topic-は] do [every-time-たびに] failed.

~たびに ('every time, whenever') attaches to a verb in dictionary form (or noun + の) and expresses repetition or correlation. たび is itself the noun 度 / 旅 — 'occasion, time' — generalized into this useful temporal marker. The pattern やるたびに ('every time she tried') with 失敗した as the consequence makes a punchy summary statement of repeated failure.