The quote heading this post - "Maternal infection during pregnancy may be responsible for some portion of autism..." - comes from the paper published by Benjamin al-Haddad and colleagues . They continue a research theme observing that pregnancy infection may have some quite far-reaching effects on the unborn child and their subsequent risk for various conditions / labels / diagnoses (see here for example).
So: "A total of 1 791 520 Swedish children born between January 1, 1973, and December 31, 2014, were observed for up to 41 years using linked population-based registries." As per use of the term 'population-linked registries', this was another study originating in Scandinavia (this time in Sweden) and their important research registries (see here). The important variables being analysed were the presence of "fetal exposure to any maternal infection while hospitalized during pregnancy" and "diagnosis of autism, depression, bipolar disorder, or psychosis among offspring."
Results: "fetal exposure to any maternal infection increased the risk of an inpatient diagnosis in the child of autism... or depression" but not seemingly for bipolar disorder or psychosis. The magnitude of the risk could be described as 'notable' but perhaps not exceptional. 'Urinary tract infection' (UTI) is mentioned as one infection that seemed to increase the risk of offspring diagnosis; something that has been kinda hinted at in other research literature  outside of the classic 'acute psychosis and UTI' research that appears in the peer-reviewed literature (see here).
Mechanisms? Well, it doesn't take a genius to figure out that most infection has a bearing on immune system functions and onward concepts like inflammation. There's quite a long history of immune system 'issues' and inflammatory processes being potentially connected to labels like autism and depression (see here and see here respectively) that provide a template for further investigation. This, bearing in mind, that pregnancy is already a time of 'reprogrammed' immune function so that a mothers body can 'tolerate' the developing fetus. As good as any place to start for further investigations...
 al-Haddad BJS. et al. Long-term Risk of Neuropsychiatric Disease After Exposure to Infection In Utero. JAMA Psychiatry. 2019. March 6.
 Hadjkacem I. et al. Prenatal, perinatal and postnatal factors associated with autism spectrum disorder. J Pediatr (Rio J). 2016 Nov - Dec;92(6):595-601.