You'll be fine as long as your flight from Dublin lands on time. If you clear Immigration in Dublin (which you probably will) when you land in Chicago, you'll get to bypass all the lines for Immigration. Head straight to Baggage Claim (a one minute walk away) and claim your bags off the carousel. They are very quick. Odds are, the bags will be on the carousel before you even get there. Then head towards Customs. Have your form ready that you filled out on the plane. Hand it to yer man at the Customs check point. Once you have passed him, you will head to another drop off point where you will drop off your bags, and they will check them on to your next flight for you. There are no queues, lines or anything to deal with. It is all very speedy and stream lined and will not take long at all. The International Arrivals Terminal (Terminal 5) deals solely with people heading on to other US destinations, so they have it down pat when it comes to getting you and your bags to your next flight. There are screen monitors everywhere. Look up what terminal your United flight leaves from, and take the train to it.
You will have to go thru Security again when you get to that terminal, just as you did at Dublin airport. The whole take your shoes off, go thru scanners, have your hand luggage scanned etc etc dealio. So don't dilly dally. Don't stop to eat or pee or have a drink. You can do so once you have cleared Security, and you are on the air side side of Security. O'Hare is a very big airport. It may take you 10-15 mins to get to your gate once you have gone thru Security. So if I were you, I'd head straight to your gate. I know that in theory you are supposed to be able to check the bags all the way thru, but post 9/11 that is not always the case. I flew to Atlanta via Chicago 4 times last year (on Aer Lingus and American Airlines) and I had to ID my bags, clear Customs and re check them each time in Chicago. In O'Hare, when it come to getting from A to B speedily, the bags are not the slow pokes, the human beings are !