What exactly does "up to 3 months before" mean?

Solution 1:

There are a number of ways in which the statement may be analysed.

You can apply for a visa up to 3 months before your date of travel to the UK.

The ambiguity is in the interpretation of up to: it could mean until or it could mean a maximum of.

You can apply for a visa until 3 months before your date of travel to the UK.
You can apply for a visa a maximum of 3 months before your date of travel to the UK.

In this case, up to should almost certainly have the second meaning. There's no point in applying for a visa years before you intend to travel, because your circumstances could change in the meantime. So the authority seeks to limit the possibility of changes by forcing you to apply fairly close to the date of travel.

Solution 2:

From a language point of view, this sentence can be parse in two ways:

1) You can apply for a visa up until a moment in time that is three months before your travel date.

2) You can apply during a period ranging from 0 to 3 months before your travel date.

Now, purely practical, the only interpretation that makes much sense in this context is the second one. Otherwise, nobody could apply for a visa unless they plan their trip more than three months in advance - and strict immigration rules may be one thing, but things like business trips (that stand to make the UK money indirectly) often come up on a shorter notice.