There's a difference. "Giving up on" something implies a stronger sense of accepting failure or defeat than "giving up" something.
This distinction is muddled by your use of "had to." In fact, let's change the context to demonstrate the difference more easily.
Kate gave up on her dream of being a professional gymnast after she
didn't qualify for the national championships.
This implies that Kate gave up because she accepted that she wasn't good enough. You could omit the "on" here without a change in meaning - i.e., there would still be an implication that she stopped her activities because of failure, but the implication would come largely from the context and not as much from the verb itself.
Kate gave up her dream of being a professional gymnast to be a mother
to her child.
Here, there is no implication that she wasn't good enough to become a professional gymnast or otherwise accepted defeat. She simply prioritized something else above her dream of being a gymnast. If you added the word "on" here, you'd create (in my opinion) a slight implication - very, very subtle - that perhaps expected failure had something to do with her decision.
With no context whatsoever, the "on" makes a big difference:
Kate gave up [on] her dream of being a professional gymnast.
With the on, there's an obvious implication that failure was the reason; without the on, there's an implication that she may well have prioritized something else.