A man is in a serious condition in hospital after being bashed with a baseball bat in a suspected road rage attack in Sydney's west.

The 44-year-old was driving to a grocery store in Homebush West when he honked his horn and overtook another car that had slowed down suddenly in front of him.

Police say when the man arrived at the supermarket car park he was confronted by the other car's driver who hit him over the head several times with a baseball bat.

The man collapsed and was rushed to the the intensive care unit of Royal Prince Alfred Hospital.

Police have arrested a 19-year-old Canterbury man over the attack and charged him with reckless wounding and assault occasioning actual bodily harm.