Patrick Marleau and Marty Havlat also scored for the Sharks (47-18-9) who moved four points up on idle Anaheim for the Pacific Division lead and remained two points back of St. Louis for first in the Western Conference.
San Jose clinched a playoff spot in a shootout loss to Calgary on Monday.
David Perron and Taylor Hall responded for the second-to-last place Oilers (25-39-9) who have lost three in a row, including a humbling 8-1 loss to the rival Calgary Flames on Sunday on the heels of a 3-1 defeat to the last-place Buffalo Sabres.
The Oilers started the scoring just over four minutes into the first period as Perron danced around Shark Tyler Kennedy before picking a perfect spot on a shot past San Jose goalie Antti Niemi. It was Perron's team-leading 26th goal of the season.
The first period shots narrowly favoured the Sharks, who had 11 on Edmonton starter Ben Scrivens to the Oilers' 10 in the opening frame.
San Jose tied the game on the power play six-and-a-half-minutes into the second period. Scrivens made the initial stop on a shot from the slot by Marleau, but the rebound angled to Pavelski at the side of the net with a wide-open cage to put in his 35th of the year.
Another power-play goal midway through the second period gave San Jose a 2-1 lead, as Pavelski chopped a puck to Marleau at the top of the opposite circle and the Sharks assistant captain's lighting-quick release led to a goal before Scrivens could get across. It was Marleau's 31st goal of the year.
The Sharks took a two-goal lead with 30 seconds left to play in the middle period as Edmonton defender Jeff Petry overskated a puck at his own blue-line, allowing Havlat to come in and send a wrist shot that beat Scrivens stick-side.
San Jose scored their third man-advantage goal of the game just over a minute into the third period. Pavelski got the puck with space in the front of the net, waited for defender Andrew Ference to go down, and then beat Scrivens over the blocker to make it 4-1.
Pavelski earned his third hat trick of the season with seven minutes left in the third as he took a shot that hit the stick of Edmonton's Matt Hendricks and deflected into the Oilers net. Pavelski's four-point night gave him 71 points on the season.
Edmonton made it look a little better with five minutes left to play as Hall picked up a rebound in front and hooked a diving backhand shot into the net for this 25th to make it 5-2.
The Oilers have been outscored 16-4 in their last three home games.
Notes: It was the fourth of five games this season between the two teams this season. The Sharks won the first two games before the Oilers got one back in the most recent meeting on Jan. 29 when Ben Scrivens recorded a record-setting 59 saves in a 3-0 shutout win in Edmonton… Both teams were coming off of losses to the Calgary Flames, although of vastly different degrees. The Oilers were embarrassed 8-1 by the provincial rival Flames at home on Sunday, while the Sharks lost a 2-1 game in Calgary on Monday in a shootout… Laurent Brossoit was called up from the AHL for the game to serve as the Oilers backup goalie after Viktor Fasth was injured in a collision in practice on Wednesday… Oilers forward Nail Yakupov missed his fourth straight game with an ankle injury… Sharks forward Logan Couture was unable to play after he suffered a lower-body injury while blocking a shot in Wednesday's game in Calgary. Also out for the Sharks were forwards Tomas Hertl (knee) and Raffi Torres, both out with knee injuries. Defenceman Brad Stuart played his second game back since missing 13 games with an upper-body injury… Sharks winger Adam Burish left the game in the second period after taking a hard shot to his hand.