Here's why:
* Gerund: A gerund is a verb form ending in "-ing" that acts as a noun.
* Gerund phrase: A gerund phrase includes the gerund and any modifiers or objects that go with it.
In this sentence, "Driving carelessly" functions as the subject of the sentence. It tells us what increases the likelihood of an accident.