I'm confused also. I'd like to think the spelling "flour" came before "flower", both meaning "flower" (Latin flos).

In the past "U" was written as "V". The letter "W" was formally invented around 1500. The evolution might have been flor (French), flovr or flour, then flovver or flouuer, and finally they split into flour and flower, with the current meanings. Does that make sense?

In summary, the spelling "flour" came before the spelling "flower". But the meaning of "flour", came after the meaning "flower".