Once again, I see some posters give you that same old "the game is fine.... You just need to adjust" response.
Yes, that tends to happen when people ignore the game going on around them.
Are there problems with the barbarian implementation? Yes. Is the fact they attack you one of them? No.
Unlike the previous versions, there is no grace period, there is no transition from animals that don't get into the city border so players have time to build enough defense.
And you don't need one, since you
do have enough time to build a defense for the displayed attack. And even if you didn't have enough defense, you earn enough gold to simply
buy a defense; you'll be interrupted a couple turns, but have no trouble fending it off.
And even if you spent all your gold, the displayed attack is not fatal, and could be repelled by building a slinger. (or archer!)
There are problems with the grace period approach, since it makes barbarian management a matter of gaming the system rather than building adequate defenses.
At emperor and above, if one want to play a bit safe one has to keep pumping out military units. It forces players to play the same style, and even then it's a matter of pure luck as the spawn rate is ridiculously high.
(ignoring the gotm) I only played at deity, and never got that feeling.
I once got a perfect start location and even popped a relic.....but then started getting rushed by 3 and then 6 horsed units within 30 turns. Once the barb scout starts the alarm clock mode there's not much one can do.
This is a problem, but not the problem displayed in the OP.