Ulysses was written between the years 1914 and 1921. During this time, Joyce was in self-imposed exile from Ireland, first in Trieste, then in Zürich, then in Paris. Yet all of his work is set in his native Dublin, and he is absolutely fanatical about the details of the city. In a chapter like "The Wandering Rocks," as the viceregal cavalcade (horse-drawn procession carrying the earl of Dudley to a charity gathering) moves through the city, we get so much detail that we could practically draw a map of Dublin based on the procession of the cavalcade. In other episodes, such as "Lestrygonians," we find that Bloom's thoughts are constantly woven into the sights and sounds of Dublin. If he passes a butcher's shop, his thoughts turn to meat. If he passes a soap shop, his thoughts turn to hygiene. If you ever spend time in Dublin, you'll no doubt see a couple of zealous Joyce fans wandering around the city with the text trying to figure out different correspondences. In fact, on June 16 every year, there's a holiday called "Bloomsday" where people wander around the city and re-trace Bloom's steps in honor of Joyce.
It is rumored that Joyce bragged that he wanted his picture of Dublin to be so complete that if the city were to disappear from the earth, it could be entirely reconstructed based on his book. That may be going a bit far, but beyond the simple geography of the city, it's important to note the extent to which the book is drenched in Dublin culture, life, and slang. As is noted in the "Character" section, a number of characters are based on actual Dublin figures. Buck Mulligan is a stand in for Oliver St. John Gogarty, Lenehan for Matt Lenehan and Matt Hart, Simon Dedalus for Joyce's father, John Stanislaus Joyce. Other characters are plucked right out of Dublin life – Richard Best, George Moore, Davy Byrne, the Hely's sandwichmen, the madman Farrel. In fact, after the book was released, people would go around Dublin asking one another whether or not they were in it. Similarly, there is much real-life gossip worked into the book. If you move through Gifford's annotations, you'll find that some of the confusing references in the book are simply elliptical bits of Dublin gossip. The book throws its threads right out into the real world, and thereby weaves itself into it.
Ulysses is also full of the social issues that were prevalent in Dublin at the time. The two major political issues were land reform and Home Rule. Land reform dealt with the fact that much of Ireland's land was controlled by wealthy land-holders but worked by peasants who lived in dire poverty. The reform sought ways to increase the rights of the peasants that worked the land. Home Rule, the dominant question for Joyce, had to do with whether or not Ireland could become independent from English colonization. Charles Stewart Parnell (see his "Character Analysis") had set up a strong coalition of the Irish members of parliament in the 1880s and nearly succeeded in passing a Home Rule bill. Yet hopes of independence vanished when Parnell's affair with Katherine O'Shea was out'ed; his popularity greatly decreased. In 1904, many Dubliners were still experiencing a political hangover from the hopes that they had hinged on Parnell's success. Resentment of the English ran deep, and fanatical nationalism was common.
Reading Ulysses, it sure doesn't hurt to know a bit about Aristotle or Goethe, but there's really no better guide to the book than Dublin itself. Unfortunately, most of us can't just hop on a plane and check it out, but if you have some free time get up on Google images and look up pictures of the Liffey and the Customs House and the National Library – it might go a long way toward helping you imagine the world of the book.