I'm having the same problem, Retina 15 inch MacBook Pro (late 2013) running OS X El Capitan 10.11.3.
I've had the issue ever since upgrading to El Crapitan, but I did not have it on Mavericks or Yosemite.
I'll be watching a YouTube video in Safari, and sometimes as I close the tab, the entire system except for the mouse completely freezes for 10 to 60 seconds. It almost always unfreezes itself within at most a minute or so and everything is back to normal, but sometimes it takes longer and I'll do a hard reset (maybe given enough time it would unfreeze eventually).
During the hangs, my console log usually says "kernel[0]: Trying to restart GPU (Intel Iris Pro)..."
... as well as "Spotlight[357]: XPC connection was invalidated" many times.
The GPU restart log mentions "MAIN Ring is hung in a batch buffer <-- ROOT CAUSE!", whatever that means.
Here are two logs of one of the recent hangs:
Here's the Console log
And here's the GPU Hang log
It happens about once a day ever since installing El Capitan, very annoying.
I don't have Flash installed.
I was hoping that 10.11.1 would fix it, or .2, but by .3 it still hasn't been fixed, so I'm losing hope of a future fix.
I know Apple has a bad reputation when it comes to failing GPUs, and I've had that happen with a previous Mac, so I'm wondering if this could be a hardware issue. Can we even rule that out?