Galileo got himself into a lot of trouble with the Catholic Church, which essentially dominated politics and culture at that time. Galileo wasn't even the only one to observe spots on the Sun. The same discovery had been made independently by Harriot in England, by John Fabricius in Holland, by ancient Chinese astronomers, and by a Jesuit priest named Christopher Scheiner in Germany. As a matter of fact, dark spots had been seen with the naked eye long before.
However, the presence of blemishes on the Sun was a distasteful concept to the Church, Sheiner, the Jesuit, argued long and hard that the spots were planets. Galileo argued back, and was able to prove mathematically, by measuring the spots' apparent speed, that the spots could not have been planets. In spite of the proof, Sheiner was an influential, and now very angry, man who was able to convince other Church leaders that Galileo and his new scientific ideas were incorrect and a very serious threat.