Sanchez Watt almost found the net for hosts early on when his curling free kick missed everyone in the box and went just wide of the far post.
With five minutes of the first half remaining Colchester levelled the scores as Massey volleyed home from Freddie Sears's cross.
After the break Sears came close to a second for the hosts, but his effort was saved by Chris Maxwell.
George Moncur was the next Colchester player to test the keeper, but Maxwell was equal to his volley from the edge of the box.
In the 76th minute the hosts made their pressure count by taking the lead when Massey curled a strike into the top corner.