The meaning of “hard” in this sentence
"Hard" here is an adverb, meaning "with a great deal of effort".
Use it in a sentence, "I work so hard to get this job".
The first part of your sentence can be reshaped to "the control and discipline came to me with a great deal of effort".
Note that all the above holds valid unless "came" plays as a copula, also known as a linking verb, which shows a transfer of physical or mental state, meaning "became". It is instead an adjective. This uncertainty, however, merely bring few to no difference in the meaning.