Studies have identified prenatal flavour exposure as a determinant of taste preferences in infants; however, these studies have focused on relatively small samples and limited flavours. As many parents struggle with getting children to accept a variety of nutritious foods, a study of the factors influencing food acceptance is warranted. The objective of this study was to determine whether exposure to a wider variety of fruit and vegetables and overall higher diet quality in utero results in acceptance of a greater variety of these foods and better diet quality for offspring during childhood. This study is a secondary data analysis of pregnant women (n = 52) and their resulting offspring recruited for the Women and Their Children's Health study in NSW, Australia. Dietary intake of mothers and children was measured using food frequency questionnaires. Diet quality and vegetable and fruit variety were calculated using the Australian Recommended Food Score and the Australian Child and Adolescent Recommended Food Score. Associations between maternal and child diet quality and variety were assessed using Pearson's correlations and the total effect of in utero maternal pregnancy diet on childhood diet was decomposed into direct and indirect effect using mediation analysis. Maternal pregnancy and post-natal diet were both correlated with child diet for overall diet quality and fruit and vegetable variety (P < 0.001). Mediation analyses showed that the indirect effect of maternal pregnancy diet on child diet was mediated through maternal post-natal diet, particularly for fruit (P = 0.045) and vegetables (P = 0.055). Nutrition intervention should therefore be aimed at improving diet quality and variety in mothers with young children, in order to subsequently improve eating habits of offspring.