i realise melahirkan means 'to give birth to', but i think in english we are just as likely to use 'have' in this instance, as in: 'when did she have her baby?' is it possible to include that as acceptable translation here?
if it was future tense, it would be something like "Kapan dia akan melahirkan bayinya?" When will she give birth ...
no, it's a tricky one in english, but the simple past conjugation 'gave' won't work here. the main verb in the english version of the sentence 'to do', has already been made past tense: 'did'.
you could technically say: 'when had she given birth?' to emphasise the action being in the past. but to be honest, that kind of emphasis doesn't really work well with this context.