EXCLUSIVE

Slap-happy Katt Williams better learn to take it like he gives it -- because the IRS just walloped the comedian with an astronomical tax lien ... totaling over $4 MILLION.

Uncle Sam filed the lien against Williams, claiming the comedian failed to pay $3.2 million in taxes in 2008 ... and also bailed on another $829,352 in 2009.

It's not the first time Williams has been accused of stiffing the Feds -- back in 2010 the IRS filed another tax lien against the comedian totaling $284,000 ... mere pennies compared to the new bill.

It's the latest misfortune to befall Katt in the last few months -- he's been arrested several times, he's facing a bunch of nasty lawsuits, and his whole life is kinda going haywire.