Gregory Goyle is one of Draco Malfoy's cronies.
Throughout the entire series, Gregory Goyle has very little independent activity. When we first see him, he has settled into the role of second sidekick to Draco Malfoy, and with very few exceptions, he seems to have no activity separate from Draco for six years of the seven-year span of the story.
When Draco Malfoy introduces himself to Harry Potter on the Hogwarts Express, Goyle and Crabbe are in attendance. Harry turns Draco's offer of alliance down, so Draco "suggests" that Harry and Ron Weasley should share their food, which Harry has bought from the cart. Goyle reaches out for some, and is attacked by Scabbers, Ron's rat. Draco retreats in some confusion with Crabbe and Goyle.
It is mentioned that, when final grades were given out, Harry had hoped Goyle, "who was as almost as stupid as he was mean," would fail; but he apparently scraped through.
When Harry needs a distraction in Potions class to allow Hermione to steal potions from Professor Snape's office, he chooses to throw his firecracker into Goyle's cauldron of Swelling Solution.
Draco, Crabbe, and Goyle stay at Hogwarts over Christmas. Harry, Ron, and Hermione, attempting to determine whether Draco knows who the Heir of Slytherin is, use Polyjuice Potion to disguise themselves as Slytherins. Harry becomes a simulacrum of Goyle, while Ron becomes a copy of Crabbe. While they do fool Draco, and learn some useful things about him, they only find out that he does not know who the Heir is, either.
When Harry and Draco end up at wands drawn outside Potions class, their spells collide and ricochet. Hermione is struck by Densaugeo, a spell that makes her upper teeth grow down past her chin, while Goyle is struck by Harry's Furnunculus jinx and breaks out in boils.
On the Hogwarts Express, Ron, with his new Prefect powers, says that he is going to make Goyle write lines: "I must not look like a baboon's bottom." Hermione says this is abuse of his powers, Ron says he is only getting Draco's buddies before Draco tries to get his.
Goyle's attempt to make the Draught of Peace in the first Potions class was dreadful; Hermione reports that when he had tried to put a sample in the flagon for grading, it had exploded and set his robes on fire.
When Professor Umbridge is examining the Care of Magical Creatures class taught by Professor Grubbly-Plank, she says to Goyle that she understands there have been injuries in that class. Goyle does not answer; instead, Malfoy says that he was slashed by a Hippogriff.
Crabbe and Goyle, under the influence of Polyjuice potion to make them look like little girls, together or separately guard the entrance to the Room of Requirement while Draco is working there. They both dislike this and ask Draco what they are supposed to be guarding, but Draco does not answer.
As he leads Harry, Ron, and Hermione into the school from the Hog's Head, Neville mentions that, as part of their Dark Arts course, students are now called upon to use the Cruciatus curse on students who get detention. Neville had gotten one of his injuries for refusing, but Crabbe and Goyle seemed to enjoy it, perhaps because it was the first class they had ever been at the top of.
When Draco, Crabbe, and Goyle corner Harry in the Room of Requirement, it seems to be Crabbe and Goyle who do most of the talking. Goyle explains that they can do "Diss-lusion charms", and that they had been waiting for Harry. When Crabbe sets Fiendfyre, Harry, Ron, and Hermione escape on brooms; Harry circles back to save Draco and Goyle, but Crabbe cannot be found.
Goyle's only real strength seems to be physical, coupled with enough low cunning to be able to align himself with one particular player and stay loyal to him. He has, in his somewhat slow way, decided that Draco is on the winning side, and has chosen to ally himself with Draco. This alliance remains strong, even when Draco requires him to take on the aspect of a girl three years his junior and stand about in the hall doing guard duty.
Goyle is basically incapable of independent thought; having allied himself to Draco, he receives all his instructions from Draco and seems to act only as Draco requires.
He is very good friends with Draco Malfoy and Vincent Crabbe. Inasmuch as he is able, he hates Harry, Ron, and Hermione, and as directed by Draco, makes it his business to try and destroy Harry.
Goyle, like Crabbe, is present only to fill the role of dumb sidekick. The usual "group of bad guys" in many works of fiction consists of a "brain" component, almost always one smart guy or a shrewd guy with a smart guy in the background, and a "brawn" component, one or several muscular goons who exists simply to follow the orders of the smart guy, so that the smart guy doesn't have to risk discovery or injury in order to get his dirty work done. Crabbe and Goyle are almost stereotypical brawn, while Draco is very much the brains of that particular operation. Unlike Crabbe, who starts balking at Draco's instructions in Harry Potter and the Deathly Hallows, Goyle has no ambitions of his own, though he seems to side with Crabbe over Draco during that argument.