It took Michelangelo a bit over four years, from July of 1508 to October of 1512 to complete his work on the Sistine Chapel. The Italian papers noted that the 500th anniversary of his completion of the word was this week!
Michelangelo got off to a slow start, not having painted frescoes before. He intended to (and did) work in buon fresco, the most difficult method, and one which only true masters undertook. In addition to having to learn everything about the medium itself and making initial blunders in that area, he also had to learn some wickedly hard techniques in perspective. (Consider that his figures look "correct" on curved surfaces, viewed from nearly 60 feet below.)
However, ultimately it wasn't Michelangelo's fault that the ceiling took four years. (Once he got the hang of things, he painted like a man on fire!) The work suffered numerous setbacks, such as mold and miserable, damp weather that disallowed plaster curing.
A primary cause of downtime occurred when Julius was off waging a war, or ill to the point that Last Rites were administered. The ceiling project, and any hope Michelangelo had of being paid, were both frequently in jeopardy while Julius was absent or near death. Small wonder that the artist complained so often and bitterly about the project, really.