We won’t complain about the origins of ‘plaintiff,’ although ‘complain’ and ‘plaintiff’ are probably distantly related. ‘Complain’ is thought to derive ultimately from ‘plangere,’ a Latin word meaning ‘to strike, beat one’s breast, or lament.’ ‘Plangere’ is an ancestor of ‘plaintiff’ too.
‘Plaintiff’ comes most immediately from the Middle English ‘plaintif,’ itself a Middle French borrowing; in Middle French, ‘plaintif’ functioned both as a noun and as an adjective meaning ‘lamenting, complaining.’ That ‘plaintif’ in turn comes from the Middle French ‘plaint,’ meaning ‘a lamentation.’ (The English words ‘plaintive’ and ‘plaint’ are also descendents of these Middle French terms.) And ‘plaint’ comes from the Latin ‘planctus,’ past participle of “plangere.” Logically enough, ‘plaintiff’ applies to the one who does the complaining in a legal case.