There are a lot of questions here, so I'll go one by one.
Why did Barzini want Michael dead, after the five families had apparently made peace?
After the meeting of the Five Families, Vito expresses to Tom his conviction that the Barzini family is running the narcotics operation and that they were behind Sonny's death, Tattaglia being too much of a "pimp" to outthink Santino. During the meeting, it is Barzini who repeatedly reprimands Vito for not sharing his police and political protection to the drug operation. Vito figures he would only be taking offense so strongly if he were the man behind the operation.
Now with Vito gone, who in his final days was the Consigliere to Michael, Barzini was certain that Michael was bound to take revenge for Sonny's death, as he knew Vito was always a cunning and shrewd man, who never forgot any insults and who would go to any lengths, even wait for the longest of times to extract revenge for Sonny's death.
How did Vito know this?
Well I answered this in the first question(more specifically the first paragraph).
How did he know about the specific way in which it would happen
Well, it is said in the book, not the movie, that Vito in his earlier days had kept Clemenza and Tessio in charge of the Bronx and Brooklyn respectively because he knew that if there was a man more cunning than the Don himself, it was Tessio. Vito never wanted both his caporegime against him. This is a fact known among all the five New York Families. And in the movie when Vito decides to hand over the Empire to Michael, both Clemenza and Tessio expressed their displeasure as, unlike Sonny who was in the Family business since he was 15, Michael was as distant as one could be from the Family business.
This fact is known to Vito, that Tessio had always wanted to create a Family of his own, but was only too much in awe and respect of the Don to go against him. Once the Don was dead, Vito was certain Tessio would go on to build his own Family as he owed NOTHING to Michael.
How did he know about the specific way in which it would happen, and
how did he know Barzini would be able to turn someone close to Michael
After Michael's killing of Sollozzo and the Captain, Barzini was sure Michael had the balls to do it again to avenge his brother. He uses Tessio, in lure of allowing him to build his own Family, to arrange for Michael's meeting with Barzini. Since the Don was aware of Tessio's ambition from the very beginning, and the reason he did not go ahead with his ambition, and Clemenza's fear for losing his pull if the Don was dead, the Don was certain that Barzini would use one of his caporegimes to lure Michael into a false security of fixing a meeting in either the Bronx (Clemenza's stronghold) or Brooklyn (Tessio's stronghold) and have him assassinated there so said caporegime could create his own Family or jump to a more powerful one.
This was how the Don knew about the plot to kill Michael.
Finally the Don parts with Michael saying, and I quote,
Now listen -- whoever comes to you with this Barzini meeting -- he's
the traitor. Don't forget that.
If achieving dominance was as easy as sending some goons to kill the
heads of the other families, why hadn't someone tried this before? Why
weren't they better protected? Why did it happen when it did?
The answer to this lies in the book. Did you know New York had six Families originally? The Sixth Family was into Olive Oil imports and since the Don was the second largest importer of Italian Oil at that time, the Sixth Family tried to assassinate the Don in the similar as Sollozzo had tried. And had survived. This was 1935, peak of the Great Depression, and similarly all six Families were at war. At the end of it, the sixth family was disbanded, and the Corleone Family became the largest importer and the strongest Family among the five.
Coming back to present day (1945) New York, Don Corleone never wanted to break the peace made by all the Families. He waited only just so that the Tattaglia Family would be the first to break the rules laid by the Commission against drug trafficking, e.g. selling drugs to Italians. Once the Don was convinced this was happening, he retaliated by eliminating heads of all the Families and was justified in doing so. He waited because he didn't want Michael to be assassinated out of revenge or by the Commission.