I've had a few occasions where my flight arrived 15-20 minutes early only to end up sitting on the tarmac for about 45 minutes waiting for a gate. The longest was a triple whammy. Arrived 10 minutes early, waited 40 minutes for gate to open, than another 15 minutes for a GA to show up to position the jetway, then another 20 because the jetway malfunctioned and wouldn't line up right.