David Gilbert hit a century break as he fought back against Kurt Maflin in their first-round encounter.