it says i got it wrong because i put went to the work , why is not just i gwaith , i'r gwaith literally means to the work
The problem is the tense. Went is the past tense, not the perfect which would be "have gone" or "have been"
I translated this as a more casual "Did you go to work?" Not too torn up about it, but I feel like the spirit of the sentence is still there :/
You're talking about the past, whereas the question is about the present. Imagine someone phoning you up and asking, "Have you gone to work?" - in other words are you there now, or are you on the way. What you wrote would refer to a conversation you have with the person the next day, about what they did yesterday or some other time in the past. However, in American English, Did you go to work would be an appropriate translation due to grammar differences.
I put 'Have you gone to work' and it corrected me and said that it should have been 'the work'. Is that how they say it in Welsh? Instead of just 'work', it's 'the work'?
Yes, in English we just say "to work", but in welsh it's "i'r gwaith". So the correct translation of i'r gwaith is to work, not to the work. Actually you translated it correctly.