Is gestational diabetes a dominant or recessive trait?

Complex disease. Gestational diabetes (gdm), like type 2 diabetes, are related metabolic conditions with strong inherited genetic tendencies --- but multiple genes are involved in their expression (appearance in any person). So gdm is neither a dominant nor recessive trait. Whether a person gets gdm is also strongly impacted by age, weight, exercise levels, dietary factors, which are not genetically determined.
Neither. Gestational diabetes is like type 2 dm, which has a polygenic inheritance. It is not due to a simple mendelian inheritance.