Granger iced the win with two free throws with five seconds left while Brandon Rush added 21 points for Indiana, who at 35-45 are out of the running for a playoff spot.
“When they (Detroit) took the lead we hung tough and did what we had to,” Pacers coach Jim O’Brien told reporters.
Jarrett Jack and T.J. Ford also recorded 18 apiece for the home team.
Richard Hamilton scored 23 points to lead Detroit (39-41), which clinched an eighth consecutive post-season berth on Friday.
The Pistons hold the eighth and final playoff spot in the Eastern Conference and trail the Chicago Bulls by one game in the race for seventh with two games left in the regular season.
The Pistons host Chicago today.
“We’re already near the bottom in the playoffs and we can’t worry about who we play,” Hamilton said. “We just need to know we’ve made it to the playoffs and we need to make a run.”
Tayshaun Prince contributed 18 points, Antonio McDyess had 16 points and 15 rebounds and Will Bynum finished with 16 points.
“There is no worst-case scenario for us right now,” said Prince. “Hopefully we can go in there and do some damage (in the playoffs). I don’t think being the eight-seed that we’re in a situation we can’t handle.”
Detroit, which trailed by 12 points with nine minutes to play, grabbed the lead at 100-99 on Hamilton’s three-pointer with two minutes remaining.
With the Pistons ahead 102-101, the Pacers scored the next five points, Jack sinking the game-clinching basket on a lay-up with 37 seconds to play.
“It’s hard playing a team with nothing to lose,” Bynum said. “You have to match their energy and try to grind it out.”