WASHINGTON—Two high-stakes elections in Ohio and Kansas during the homestretch of primary season were too close to call late Tuesday, foreshadowing the fierce battle to come around the nation in November’s midterms.

In an Ohio House district that President Trump won by 11 percentage points in 2016, Republican Troy Balderson claimed a razor-thin victory over Democrat Danny O’Connor, although the Associated Press said the race is too close to call.

The...