The phrase “to keep one’s eye on the ball” means: To be closely attentive; to be alert, alive and kicking, on one’s toes; to sit up and take notice.
This has been popular American speech in a figurative sense for at least fifty years.
In source, although applicable to any sport in which a ball is kept in motion, tennis, golf, billiards, bowls, polo, it was probably the game of football from which it was derived, from the urgent instructions of college coaches.