Would adding paragraph about the motivation provided by someone who doubted me to my final year project acknowledgment be unprofessional?
I would refrain from adding this to the written/electronic version of the project report. It's very personal and uses colloquial language that should be avoided in a formal report, even in the acknowledgement section.

Having said that, you may still give to that particular teacher a copy with your personal hand-written dedication.

Btw, great example of negative motivation (or what it's called): a negative comment with positive result.