anlocken
to lure
To get people or animals to come to a certain place by means of bait, a promise, or an appealing stimulus.
Der Duft von frischem Brot lockte die Kunden in die Bäckerei an.
The smell of fresh bread lured customers into the bakery.

to attract / lure
Loading your saved state.
to lure
To get people or animals to come to a certain place by means of bait, a promise, or an appealing stimulus.
Der Duft von frischem Brot lockte die Kunden in die Bäckerei an.
The smell of fresh bread lured customers into the bakery.

'Anlocken' (to attract/lure) is a separable verb. The prefix 'an-' comes at the end in a main clause. In subordinate clauses and in the infinitive with 'zu', the verb stays together.
Die bunten Blumen locken viele Schmetterlinge an.
The colorful flowers attract many butterflies.
The verb consists of the prefix 'an-' and the verb 'locken' (to lure/entice). 'Locken' means to entice or attract someone. The prefix 'an-' emphasizes movement toward a place.
Mit speziellen Lampen kann man nachts Motten anlocken.
With special lamps, you can attract moths at night.
'Anlocken' (to attract/lure) is often used with the preposition 'mit' (with) or the conjunction 'durch' (through/by) to state the means or reason for the attraction. The structure is: jemanden/etwas mit etwas anlocken (to attract/lure someone/something with something).
Die Firma lockt Bewerber mit flexiblen Arbeitszeiten an.
The company attracts applicants with flexible working hours.
In the general meaning, the verb is often combined with living beings. Typical objects are 'Kunden' (customers), 'Besucher' (visitors), 'Tiere' (animals), or 'Insekten' (insects).
Das Festival lockt jedes Jahr Tausende von Besuchern an.
The festival attracts thousands of visitors every year.
In an economic context, you can recognize this meaning from objects such as 'Investoren' (investors), 'Unternehmen' (companies), 'Fachkräfte' (skilled workers), or 'Touristen' (tourists).
Die Stadt möchte mehr junge Fachkräfte anlocken.
The city wants to attract more young skilled workers.
to win / gain
'gewinnen' and 'anlocken' can both mean that you get people interested in something. 'jemanden für etwas gewinnen' (to win someone over for something) means: you convince a person to take part or support an idea. 'anlocken' is more about an offer, an advantage, or an appealing stimulus bringing people or animals to a place or arousing their interest. The words can be confused because both can be used with customers, guests, or skilled workers. 'gewinnen' sounds more like persuasion, while 'anlocken' sounds more like an attractive offer.

Im Sommer locken günstige Zugtickets viele Touristen in die Stadt an.
In summer, cheap train tickets attract many tourists to the city.
Ali möchte noch mehr Nachbarn für das Ehrenamt gewinnen.
Ali wants to win even more neighbors over for the volunteer work.