We are all born with a natural capacity to feel emotions in all of their splendor, it's our Gods given ability to help us know what is right and wrong, as well as to empathize with our Earthen fellows (humans and animals). Happiness, Fear, Sadness, even Disgust.
But are we born with the capacity to feel Guilty? Or by extension Shame? Is it learned? Or is it Innate?
Why?
2 aspects:
First, both are natural: both of these emotions are innately built in to our brain, or their mechanism that is.
So on the one hand they work both automatically (by hard wired reactions), but on the other hand they can be triggered by learned social training/conditioning. So you have both a natural emotion as it were, but also a learned conditioning to add to that. Both.
Natural reactions between humans are for example actually mediated by facial expression communications that all humans automatically have and react to (though it's only one factor in how you react).
Shame and guilt can work via these.
But also there are socially learned conditioning we all have, individually, about what is right and wrong and acceptable socially that also can trigger shame and guilt also.
Of course, many of these socially learned conditionings are quite reasonable, like feeling guilty for stealing your neighbor's garden hose for example, from the conditioned learning that theft is socially unacceptable.
Infamously though, we can be conditioned to be guilty or ashamed for things that are not really harmful too, such as in a dysfunctional family dynamic.