Several ancient games fit the description of counters moving across a gridded track. The most famous examples include:
While it's impossible to crown a single "earliest" game due to gaps in the archaeological record, these three represent the earliest well-documented board games featuring counters moving across a gridded track.