With James resting, Williams and Gibson outscored Detroit by themselves in a 15-2 run to take a 73-68 lead early in the fourth quarter.
James sealed the victory on a driving layup, an assist, 3-pointer and free throw to put the Cavs ahead by nine with 2 1/2 minutes left.
The Central Division-leading Cavs have won six of their last seven and are 12 games ahead of Detroit.
Allen Iverson scored 22 points for the Pistons, who have lost nine of 12 and are 21-21 with him.
Detroit's Rasheed Wallace scored just nine points and Rodney Stuckey added only six.
Reserve Richard Hamilton scored 16 points, Tayshaun Prince had 11 and Amir Johnson scored 10 points for the first time in a month.
Williams, who has become James' best sidekick on the perimeter, scored 22 points and Gibson scored all seven of his points in the fourth.
Cleveland's Zydrunas Ilgauskas had 13 points on 5-of-16 shooting, playing in his second game after being sidelined for 13 games with an ankle injury.
The Cavs have been unbeatable at home with a 22-0 record and have been solid on the road, winning 15 of 24 games.
Cleveland led 18-16 after a sluggish first quarter, then trailed by three at halftime.
Iverson took control in the third quarter, helping the Pistons outscore Cleveland by seven, but they fell apart in the fourth
-- as they often have this season -- while getting outscored 25-10.
Notes: Williams, an All-Star snub, has scored in double figures in a career-high 20 straight games. He is averaging more than 17 points. ... Detroit beat the Cavs at home in their only other meeting. ... The Pistons fell to 1-8 on Sundays. ... If the Cavs hold onto their big lead in the Central, they will earn just the second division title in franchise history and the first since 1976. ... James averaged 27.5 points, 9.6 rebounds and 8.2 assists in January, having the best month in those categories since Larry Bird in March of 1987, according to the Elias Sports Bureau.