The accident took place on Jamka crossing when a speeding truck hit a tempo and another van and then overturned, SP (City) Dinesh Tripathi said.
All those killed were riding in the van which fell into a roadside ditch after being hit by the truck, the SP said, adding the truck later overturned over the van.
Sixteen people, including a woman and three children, died on the spot.
The injured have been admitted to a local hospital, the SP said.
Chief Minister Yogi Adityanath has directed officials concerned to ensure proper care and treatment of the injured persons.
A senior government official said the CM has expressed condolences over the death of passengers and has directed that appropriate compensation be provided.