The hybrid pixel detector Timepix3 allows the measurement of the time and energy deposition of an event simultaneously in each 55 $mu$m pixel, which makes Timepix3 a promising approach for a compact Compton camera. However, in Compton camera based on this kind of pixelated detector, the angular resolution is degraded in imaging of MeV gamma sources, because the diffusion of energetic Compton electron or photoelectron could trigger many pixels and lead to an inaccurate measurement of interaction position. In this study, an electron track algorithm is used to reconstruct the interaction point. From the demonstration of a Timepix3-based single layer Compton camera, a significant improvement of angular resolution is shown experimentally. The Timepix3-based single layer Compton camera could provide an ARM of 14 degrees (FWHM) in imaging of a Co-60 gamma source.