OS X
In Snow Leopard, go to Network preferences, click on the Advanced button, then on the TCP/IP tab. As with iOS, the router is identified as "Router".
In Yosemite you can get the IP address of the router a few ways.
One approach is a terminal command. Run terminal with Go -> Utilities -> Terminal, then enter:
netstat -nr | grep default
The output looks something like
Default 192.168.3.1 UGSc 317 2 en0
In this example, the routers IP address is 192.168.3.1.
Another terminal command you can try is
route -n get default
Look for "gateway" on a line by itself. To the right of it is the IP address of the router.
If using Wi-Fi on Yosemite, Option clicking on the Wi-Fi indicator causes the system to display more data than a normal click. Included in this additional data is the IP address of the router, identified as "Router". Option clicking did not display the router IP address in Lion, I'm not sure which release of OS X introduced it.
A normal click on the Wi-Fi indicator also produces the router IP address if you look hard enough. Click on Open Network Preferences, then on the Wi-Fi network interface in left side column (should say "connected"), then click the Advanced... button, then the TCP/IP tab and look for "Router". Whew.
If not using Wi-Fi, then: System Preferences -> Network -> click on the "connected" network interface in the column on the left -> Advanced... button -> TCP/IP tab and look for "Router".
If that's not enough, the IP address is also available in the System Information utility (Go -> Utilities -> System Information). Click on Network in the left side column, then Wi-Fi in the top pane (not the left pane), and look for "Router" in the IPv4 section.