Barker sprinted away from her Dutch rival to take gold in the 40-lap (10km) race.
Belgium's Jolien D'Hoore, who was third in 2017 and runner-up in 2018, edged out France's Laurie Berthon for another medal.
The medal hopes of contenders Amalie Dideriksen of Denmark and Italy's Martina Fidanza ended when they got caught up in a fall amongst the peloton.
Barker, 25, who was second in the race in 2017, won her first world title in 2013 as part of the pursuit team.
The Welsh rider is also an Olympic champion having been part of the gold medal team at the 2016 Games in Rio.