At this time, Goku had let down all of his defenses as he was not expecting an attack. Lowering his defense when he felt he had the upperhand is one of Goku's downfalls that Whis kept pointing out throughout the movie, indicating it could be his downfall. This blatant foreshadowing hits its mark when Goku feels that he has won and is hit by Sorbet's surprise attack.
Goku's skin as a Saiyan is tougher than a normal human's skin as we saw in the Dragon Ball scene where the bullets miraculously bounce off him like he was Superman. However, for Ki attacks, the person defending must be prepared to defend the attack.
An example of this is when Krillin was able to pierce Vegeta with a Ki blast during the Frieza saga of Dragon Ball Z. Normally, Vegeta would be able to withstand this type of attack, especially by someone as weak as Krillin. However, he had lowered his defenses, albeit purposefully, making the attack effective.
Also, these aren't bullets, it's a high-powered ray gun blast; moreover, it's likely the most powerful ray gun in the universe, seeing as it is being wielded by the fill-in leader of Frieza's army with the purpose of killing Goku. Goku was completely unprepared, with no Ki defenses raised and thus, the high-powered laser was able to pierce him.