Galileo was tried for heresy because of his support of the Heliocentric model of the solar system. This model was at odds with what the Church was claiming at the time, and the Church believed that it was inspired by God, so anyone challenging their dogmas was a "heretic".