This caused us to lose a lot of time, and if not for that accident, the end of the race probably would have gone much better.

Literal

This [cause-が原因で] time [object-を] greatly lost [regrettably-てしまい], perhaps this accident [subject-が] not-existed-[if-たら], race final-stage [topic-は] more good had-become [conjecture-だろう].

A motorsport commentary sentence. これが原因で ('because of this') marks the cause. タイム and ロス and アクシデント and レース are all loanwords — characteristic of sports commentary. ~てしまい is the conjunctive form of ~てしまう, linking to the counterfactual. The counterfactual is expressed with ~なかったら…だろう — 'if X hadn't happened, Y would probably have been the case.' もしかしたら ('perhaps / maybe') hedges the counterfactual.