I find www.nationalrail.co.uk to be the easiest site for finding fares.
If you put in for Gatwick (GAT) to Cardiff (CDF), you can find single fares (no Railcard used) for around £20 if you book ahead. These apply to specific trains. OK - so you are not sure when you will clear Gatwick & catch a train. Having pre-booked your specific train - allowing plenty of time, should you turn up earlier, wait on platform for earlier service and be where rear of train stops - here you will find the conductor. Say you are booked for a later service but would it be OK for you to board his/her train. (Usually, they will let you board with no penalty - unless it is packed out).
On the GAT > CDF route, you will see several options. My advice would be to go for the ones that say 1 change (at Reading). You can click 'details' to find this out. This is far more convenient than the ones that go via London - which involve a tube journey to Paddington. The Reading change also tends to be cheaper.
You will also find that by travelling on Saturdays, you do not get peak fares at commuting times as less people go to work. Avoid Fridays from 3pm to 7pm if possible. The fares on the Cardiff>Bath>Salisbury>Romsey route tend to be reasonable.
You can from abroad buy the Britrail Pass but these tend to be expensive. www.britrail.com