How does the "Gurney flap" work??

Gurney flap was invented by famous racing driver "Dan Gurney" in 70's.

We can find his name on the great scene from the greatest film "Ford vs Ferrari"

The beginning of film he raced against Ken Miles at Willow spring circuit.

Surprisingly his role was played by his own son.

 

Anyway...the principal of "Gurney flap" on rearwing is easy.

It dams up the air flow on upper side and sucks air out from below of the wing.

This means it gives you a extra "circulations" .

Normal wing flow

Gurney flap helps flow

 

The "Gurney flaps" gives you more "Lift coefficient" *downforce

 with small amount of drag. 

We can see some flow going up at the trading edge which is called "Upwash"

This helps the air flow attach at the end of the wing, and is preventing the lower flow from separation.

In other words, the wing become difficult to "stall"

 

In conclusion, the wing attaching a gurney flap has more aerodynamics efficiency i.e. higher downforce & less extra drags.
 
Furthermore, it has higher attack angle capacity which represent the "red" curve
in the graph below. The purple curve shows performance of the gurney-less wing.

 

 aerodynamics curve gurney