Arriving international flight at Chicago ORD on American and taking domestic from ORD to TX on United. I have a two-hour window. Can I check my bag at the gate for my United flight or will I be required to go to ticket counter and back through security?
Assuming that you are not arriving from a pre-clearance place:
When arriving in Chicago, you will first need to go through passport checks, then through customs and can only then check in your bag for the next leg. This holds regardless of whether you booked both legs onto the same ticket.
After that, the procedure differs: if they are not on the same ticket, then it very unlikely that American lets you check your bag through to your final destination before boarding your first flight (to Chicago). Thus, after collecting your luggage, you will need to bring it to the United counter. If you are lucky, the time window for checking in luggage will not have passed by then.
If both flights are on the same ticket, your bag will be tagged to your final destination already - just give your checked bag to the airport staff collecting luggage for further transfer after going through customs and head on to the gate.
Note that your question "Can I check my bag at the gate for my United flight or will I be required to go to ticket counter and back through security" is not applicable - there is no gate where you could check your bag. You will in any case need to go through the passport check/immigration, customs, and then security. This holds regardless of how the ticket(s) were booked.