I gave my last bit of money to that poor boy.

Literal

I [topic-は] that poor boy [to-に] trifling [of-の] money [object-を] gave.

なけなし is an old word (from 無けな+し) meaning 'what little one has' — very small/meager. It's formal and literary, rarely heard in casual speech. The structure [person]にXを与える ('to give X to person') is the standard 'give' pattern with a recipient marked by に.