Clint Dempsey's deflected effort opened the scoring for the visitors after 76 minutes, but South African Pienaar superbly headed home to restore parity and then 88 seconds later Jelavic stole in to meet Apostolos Vellios' attempted overhead kick to seal victory.
The three points helped the Merseysiders extend their unbeaten home league record to 12 matches and they earned the added bonus of moving above their opponents into fourth position in the Premier League standings on goal difference.
Leon Osman and Pienaar both missed Jelavic's cut-back early on with the Croatia striker himself denied by William Gallas after Kevin Mirallas broke down the right.
Seamus Coleman fired into the side-netting, Marouane Fellaini headed over a corner and Osman clipped left-footed cross-shot wide from Fellaini lay-off as Everton dominated.
Shouts for a penalty against Dempsey after the ball came off his chest were magnified greatly when Pienaar's shot hit William Gallas' arm but referee Kevin Friend remained unmoved.
After the break, Leighton Baines' strike from a free-kick rebound flew into the penalty box, but both Jelavic and substitute Steven Naismith failed to get the decisive touch which would have brought the opening goal.
It took until the 54th minute for Spurs to properly test Everton goalkeeper Tim Howard with Jan Vertonghen's swerving and dipping shot tipped over by the United States international.
The visitors then produced an ultimate sucker-punch as Dempsey received the ball with his back to goal 30 yards out, turned and hit a shot which took a slight-enough deflection of Sylvain Distin to send it dipping over Howard.
Substitute Gylfi Sigurdsson hit the crossbar with a curling shot as gaps opened up as Everton pressed for the equaliser.
And it duly came in the last minute when Coleman crossed and Pienaar firmly headed past Lloris from just inside the area.
But there was further late drama as Darron Gibson's pass was touched on by substitute Vellios and Jelavic struck to the delight of the home faithful.
|Everton||Team Statistics||Tottenham Hotspur|
|0||1st Half Goals||0|
|4||Shots on Target||5|
|9||Shots off Target||1|
|48.3||1st Half Poss.||51.7|
|51.1||2nd Half Poss.||48.9|