I have possible links but no definite matches.
The Edward Williams that I have (1756-1846) was married to Ann Jones 1767-1836, and he was the son of William Williams, born before 1720, who farmed Bwllfa Farm, Penderyn. One major branch of the family subsequently farmed Trebanog Ganol (later renamed Trebanog Fach - Trebanog is sometimes also spelled Trebannog).
His son was Griffith Williams b 1794. However, he did not marry, and was living at the 1851 census at Trebanog Fach.
There are various Thomas Williamses also associated with the family - for instance Thomas Williams of Bwllfa who in 1827 brought an action against Morgan Morgan,Esquire, of Bodwigiad (the major landowning family in the area) over a long-standing feud over common land grazing on Mynydd y Glog (Glogue Mountain).
You really need to let me know a few farm names that you've found from the census to try to identify any potential links. Remember that Williams and Morgan are common surnames in the area, and that they also represent influential families there. Kendon, or Cendon, is another farm associated with the family.
In my own 'Williams'family , Griffith, William, Thomas, Morgan and Edward are all regularly occurring first names in the 1800s - frequent occurrence of these in your family would suggest, (though not prove) connection
If your families are in fact related and we can prove that conclusively, I have a lot of information.