You need to do create a CSS file for your theme in which you can specify it.
The trick is to use a pseudo-class for the a (anchor) selector. Example:
a:visited { color: blue; }
If you place this in your theme CSS file, this will color all visited links in your web blue. Now, I assume you would like to control this a little better to only apply for the links in the GridView for example. To do this, you either set a CSS class for the asp:HyperLink, using the CssClass attribute, or you do the same with the GridView (set the CssClass). Either way, you use the name of the css class in your css rule. This is to scope the rule to only apply in a this specific context. Example:
<asp:HyperLink CssClass="gwlink" runat="server" NavigateUrl="....."></asp:HyperLink>
Then in your CSS file, you do:
.gwlink a:visisted { color: blue; }
This will effectively render all visited links marked as gwlink in blue.