We studied the factors that predict liking for vegetables and preference for a variety of vegetables among schoolchildren. Additionally, we examined if there were gender differences in the predictors that explain the hypothesized higher scores in liking vegetables and preferences among girls. The data from the PRO GREENS project included 424 Finnish children (response rate 77%) aged 11 to 12. The children completed validated measures about social and environmental factors related to their liking for vegetables and preferences both at baseline 2009 and follow-up 2010. The associations were examined with regression and mediation analyses. The strongest predictors of both girls' and boys' liking and preferences were higher levels of eating vegetables together with the family, previous vegetable intake and a lower level of perceived barriers. Liking was additionally predicted by a lower level of parental demand that their child should eat vegetables. Girls reported higher levels of liking and preferences in the follow-up. This gender difference was mainly explained by girls' lower level of perceived barriers related to vegetable intake and girls' higher previous vegetable intake. Interventions that aim to increase the low vegetable intake among boys by increasing their liking for vegetables and preference for a variety of vegetables could benefit from targeting perceived barriers, namely boys' perception and values concerning the consumption of vegetables.