Gulbis defeated the world's second-ranked player 6-4, 6-3 to create a quarterfinal matchup with Milos Raonic. It was the sixth meeting between Gulbis and Murray, their most recent match having come three years ago in Cincinnati.
Raonic also pulled off a mild upset when he ousted Juan Martin Del Potro 7-5, 6-4.
Djokovic, who is also playing for the first time since falling to Murray in the Wimbledon final, had to rally to defeat Istomin 2-6, 6-4, 6-4. Djokovic is seeking his first tournament victory since winning a Masters event in Monaco four months ago.
Richard Gasquet will face Djokovic in the quarterfinals after coming from behind against Kei Nishikori 1-6, 6-3, 6-3.
Nadal advanced with a 7-6 (8-6), 6-4 victory over Jerzy Janowicz, Matosevic outlasted Benoit Paire 7-6 (9-7), 6-7 (10-12), 6-3, Davydenko defeated Alex Bogomolov 6-2, 6-4 and Pospisil fought off Tomas Berdych 7-5, 2-6, 7-6 (7-5).
Trader Joe's: Car crashes into Long Island store, injuring 11
Wisconsin business offering 'therapeutic cuddling' forced to close