''classes'' and ''lessons'' finish at a certain time. This (class)(lesson) will finish at 6:00 pm at the latest.
However, it is possible to say, 'The course will finish at 6:00 pm (at the latest).', especially if it is a one-day course. Is that what you mean, or do you mean 'The class will finish at 6:00 pm at the latest.'?
- For Teachers