From its title, the poem makes clear that its subject is literature. Indeed, the title, which references looking into a book (Chapman's translation of Homer), suggests that the poem will specifically deal with an individual's experience of reading literature. This means that, though the first line doesn't explicitly state that it is metaphorical, there is already a sense from the title alone that the "realms of gold" through which the speaker has traveled relate to literature rather than actual places.
The first four lines are, in essence, the speaker's account of their literary reading to date. The speaker has experienced a range of literature's treasures ("gold"). Indeed, line 4's mention of "bards" loyal to the classical Greek god Apollo indicates that the speaker has experience of specifically classical literature, the category that Homer's works fall into. The point of these lines, then, is to set the speaker up not as a literary novice, but as someone who has read widely. This allows the speaker to then demonstrate just how powerful this particular translation of Homer is (this turn comes in line 7). So, the first four lines work to establish the speaker's literary credentials.
The other important function of the first four lines is to set up the extended metaphor that enables the poem to make its point about Chapman's Homer in an exciting and visual way. The speaker claims to be a traveler not because of having taken actual trips around the world, but because literature itself is a way of imaginative travel—through both time and space. The poem takes this metaphorical exploration and runs with it throughout, alluding to common knowledge about actual explorations of the so-called "New World" (the Americas and Oceania seen from the point of view of Western Europeans).
These four lines all share a common consonantal sound, the /l/:
Much have I travell'd in the realms of gold,
And many goodly states and kingdoms seen;
Round many western islands have I been
Which bards in fealty to Apollo hold.
This soft repeating sound has a luxurious quality, reflecting the idea that treasure that is important to the poem. Of course, this treasure is not literal "gold" but is rather intellectual and emotional, the mental rewards of engaging literature with the imagination.
If lines 1 and 2 deal with the benefits of literature for the individual—the rewards of "gold" and experiencing "goodly states and kingdoms"—lines 3 and 4 gesture more towards the role of literature throughout human civilization. In Homer's time, of course, literature was a primarily spoken/sung activity—not written. Poetry and music occupied a central role in Ancient Greek society; they were important to communal ceremonies, cultural understanding, and collective memory. The "bards" of Ancient Greece are loyal to Apollo because Apollo is the Greek God of art. Though these lines are by and large positive about the speaker's experiences with literature to date, the idea that the speaker has been going "round" these "western islands" suggests that the speaker has not quite landed on these islands so far. That is, the speaker has looked at them from afar, but no translation has yet truly brought them to life. That, of course, is where Chapman's Homer comes in.
There is some debate about why Keats referred to these metaphorical islands as "western." The islands that Homer sang about are, in fact, to the east of Greece. It's unlikely to be a mistake, so it could be an allusion to the canon of specifically western literature, of which Homer is considered a kind of founding father. Or Keats might have made the choice in order to aid the poem's extended metaphor, which specifically rests on the westwards travels of explorers from Europe to the Americas and conjures the archetype of the mysterious west.