Mo Williams scored 22 points and J.J. Hickson had 16 for the Cavaliers, who won for the first time since beating Boston on opening night.
Jrue Holiday hit three 3-pointers in the third quarter for the Sixers to lead their rally from the huge deficit and take an 84-79 lead.
Gibson scored 10 straight points during a 19-5 run that put Philadelphia ahead for good. Gibson's twisting layup made it 103-102 with 3:26 left.
He scored 17 points in the fourth.
Holiday scored a career-high 29 points and Elton Brand had 20 for the Sixers.
Varejao was 10 for 10 from the field and the Cavaliers shot 55 percent overall. Williams added seven assists as he rounds back into form after missing time with a groin injury.
The Sixers took off in the third quarter without forward Andre Iguodala after he left with a right Achilles' tendon strain. It was not known when he was injured. Iguodala scored seven points in the first half and was not on the court for the start of the third quarter.
Without him, the Sixers were poised to pull off a stunning comeback. Holiday was perfect from 3-point range in the third when the Sixers stormed back to wipe out the lead. His first 3 of the quarter pulled the Sixers within three, his next one tied the score and his last one put them ahead 80-77.
Coach Doug Collins was back on the bench for the Sixers after leaving at halftime Wednesday because of symptoms related to vertigo. He enjoyed this one for a while after the Cavs dominated the first 24 minutes.
Andres Nocioni, who scored 15 points, put the Sixers ahead for the first time with a 3. Holiday's third 3 helped the Sixers cruise into the fourth.
They could have used Iguodala, their top defender, in the fourth.
Gibson scored from the field and free throw line during his spurt that energized the Cavaliers. Varejao had an electric dunk and Williams followed a Sixers turnover with a basket to make it 110-105.
They sealed it from the line, where they dominated the Sixers. Cleveland made 38 of 48 free throws; the Sixers only 18 for 25.
They played like they did in the first quarter when they shot 54 percent and led 34-20. Cleveland won without Antawn Jamison, who sat out with a sore left knee. Jamison was inactive for the second straight game after missing Tuesday's loss against Atlanta.
Coach Byron Scott said Jamison is day to day.
Collins returned and said he felt great. He tried to downplay concerns about his health and did not take any medication on Friday.
Notes: Collins was an assistant at Arizona State and coached Scott. ... The Sixers fell to 3-12 against the Cavaliers, and 0-8 at home, over the last four-plus seasons. ... Brand had only two rebounds after grabbing no fewer than eight in a game this season.