Consider the following commutative diagram.
In the category Set it is clear to me that $h=g\circ f$ as $h(x)$ must equal $g(f(x))$ for all $x$ in $A$.
Are there categories for which it is possible that the above diagram commutes for some $h\neq g\circ f$? (Of course $g\circ f$ would still result in a commutative diagram, just a different one). I can't find anything in the definition of a category that prohibits this, but it definitely goes against my intuition.

No. The definition of a commuting diagram is that $h = g \circ f$.