After boarding the train, I realized I'd left my wallet at home.

Literal

Train [to-に] boarded after, I [topic-は] wallet [object-を] home [at-に] left-behind came [quotative-ということ-に] noticed.

A multi-clause narrative sentence. 乗車した後で ('after boarding') uses ~た後で, the standard 'after doing' pattern. 置き忘れてきた stacks: 置き忘れる (leave behind, forget) + ~てくる (come with/keep with you in time) — 'came (to now) having left it behind.' ことに気が付く ('notice/realize that X') uses the nominalizer こと + に to mark what was noticed.