Josh Marks - Arrested in a VIOLENT Assault.

A top contender on "MasterChef" had a bizarre, violent encounter with cops in Chicago ... telling them Gordon Ramsay is an "asshole" who possessed his body and then transformed him into God ... law enforcement sources tell TMZ.

Law enforcement sources tell us ... a University of Chicago cop spotted 
Josh Marks nearby the campus on Monday  He was trying to use a University emergency phone and had obvious cuts on his face.  We're told the cop asked Marks if anything was wrong, and Marks then lunged at him, striking him with a closed fist and then tried to grab his gun.

Our sources say the cop and two other officers tried to subdue the 26-year-old, 7'2" tall culinary runner-up ... to no avail.  They batoned and pepper sprayed him but it had no effect.  Marks broke free and started running.  Five cops subdued him in a resident's backyard.

Marks was taken to the hospital to treat his injuries.  We're told once in custody an officer asked him why he went off the rails, and he blamed it all on Gordon Ramsay.  Shockingly, we're told there was no evidence of drug use.

We're told doctors discovered bullet fragments in Marks' face from an unrelated incident.

Marks remains in the hospital, chained to a bed.  He's been charged with aggravated battery on a peace officer and attempting to disarm a peace officer -- both felonies.  If convicted, he faces a max of 14 years in prison.